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

NoMethodError: undefined method `original_filename' for nil:NilClass #1168

Open
floehopper opened this issue May 30, 2017 · 0 comments
Open
Labels

Comments

@floehopper
Copy link
Contributor

This exception has occurred a few times in production recently.

I've managed to recreate it locally by editing an attachment on an existing section and clicking "Save attachment" without selecting a file.

This seems very closely related to KeyError when editing attachment and saving without selecting a file .

In this case the exception is happening on this line in Attachment::UpdateService#call, presumably because attributes[:file] is nil.

It's worth noting that I suspect the user was trying to just update the title without changing the underlying file. However, I don't think this is currently possible without re-uploading the file.

It's also worth noting that the user (in at least one case) was pre-pending "DO NOT USE:" to the title. I'm guessing this is because they really want to remove it, but I don't think there is currently any way to do this. Having said that, maybe removing an asset is complicated, because you'd want to coordinate its removal with all the places which reference it.

@floehopper floehopper added the bug label May 30, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant