mirror of
https://github.com/wahyd4/gitlabhq.git
synced 2026-08-16 08:06:08 +10:00
Check if object respond to #touch before update.
This commit is contained in:
@@ -11,8 +11,9 @@ module Notes
|
||||
# Skip system notes, like status changes and cross-references and awards
|
||||
unless note.system || note.is_award
|
||||
event = event_service.leave_note(note, note.author)
|
||||
noteable = note.noteable
|
||||
|
||||
note.noteable.touch if event.commented?
|
||||
noteable.touch if event.commented? && noteable.respond_to?(:touch)
|
||||
note.create_cross_references!
|
||||
execute_hooks(note)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user