summaryrefslogtreecommitdiff
path: root/app/services/notes/update_service.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/services/notes/update_service.rb')
-rw-r--r--app/services/notes/update_service.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/app/services/notes/update_service.rb b/app/services/notes/update_service.rb
index 573be8fbe8b..15c556498ec 100644
--- a/app/services/notes/update_service.rb
+++ b/app/services/notes/update_service.rb
@@ -7,7 +7,11 @@ module Notes
old_mentioned_users = note.mentioned_users(current_user).to_a
- note.update(params.merge(updated_by: current_user))
+ note.assign_attributes(params.merge(updated_by: current_user))
+
+ note.with_transaction_returning_status do
+ note.save && note.store_mentions!
+ end
only_commands = false