Fix RecordNotFound error when deleting attachments
Using find_by instead of find.
This commit is contained in:
@@ -240,7 +240,7 @@ class Messenger
|
||||
when 'fixed_version'
|
||||
value = object_field_value Version, detail.value
|
||||
when 'attachment'
|
||||
attachment = Attachment.find(detail.prop_key)
|
||||
attachment = Attachment.find_by id: detail.prop_key
|
||||
value = if attachment.present?
|
||||
escape = false
|
||||
"<#{object_url attachment}|#{markup_format attachment.filename}>"
|
||||
|
||||
Reference in New Issue
Block a user