Skip to content

Commit

Permalink
better handling of null entry
Browse files Browse the repository at this point in the history
  • Loading branch information
ajb committed Oct 28, 2013
1 parent a165443 commit 8ddeeb7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/formbuilder/response_field_file.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def render_input(value, opts = {})
end

def render_entry(value, opts = {})
attachment = EntryAttachment.find(value)
attachment = value && EntryAttachment.where(id: value).first

return unless attachment

Expand Down

0 comments on commit 8ddeeb7

Please sign in to comment.