Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validations break when file is missing #388

Closed
chrise86 opened this issue Feb 17, 2015 · 2 comments
Closed

Validations break when file is missing #388

chrise86 opened this issue Feb 17, 2015 · 2 comments

Comments

@chrise86
Copy link

For some reason some files that were previously uploaded by a user have disappeared (that's my own issue), but now when updating the model that owns those images (User in this case), I get a 500 error along with:

Dragonfly::Job::Fetch::NotFound <uid> not found

and an extensive error backtrace.

While I could watch and rescue from such errors, the fact that I'm getting a 500 from this doesn't seem right to me.

I guess using if: :image_changed? on the validations would help, but I thought I should mention this anyway.

@pnomolos
Copy link

I am also having this issue - apart from the if: :image_changed? suggestion, has anything bee done about this?

@markevans
Copy link
Owner

no - Dragonfly only raises an error - it's up to the surrounding application to do what it will with it - in the above case it returns 500.
the other thing to do is to manually wipe the image_uid column, otherwise it's out of sync with the fact that the images don't exist

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants