summaryrefslogtreecommitdiff
path: root/lib/api/helpers
diff options
context:
space:
mode:
authorKia Mei Somabes <kia@aelogica.com>2018-07-12 09:26:09 +0000
committerRémy Coutable <remy@rymai.me>2018-07-12 09:26:09 +0000
commit37af75a2e024bf35f09e6f014626019e960ad9b9 (patch)
treef156e2fc0ced165327e9a48ce3ae153608ff2bb4 /lib/api/helpers
parentd2c5ac61cd964e6c3ff22021734002b6e591a128 (diff)
downloadgitlab-ce-37af75a2e024bf35f09e6f014626019e960ad9b9.tar.gz
Resolve "do not set updated_at when creating note"
Diffstat (limited to 'lib/api/helpers')
-rw-r--r--lib/api/helpers/notes_helpers.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/api/helpers/notes_helpers.rb b/lib/api/helpers/notes_helpers.rb
index b4bfb677d72..e2984b08eca 100644
--- a/lib/api/helpers/notes_helpers.rb
+++ b/lib/api/helpers/notes_helpers.rb
@@ -97,6 +97,8 @@ module API
current_user.admin? || parent.owned_by?(current_user)
end
+ opts[:updated_at] = opts[:created_at] if opts[:created_at]
+
project = parent if parent.is_a?(Project)
::Notes::CreateService.new(project, current_user, opts).execute
end