Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib/api
diff options
context:
space:
mode:
authorKia Mei Somabes <kia@aelogica.com>2018-07-12 12:26:09 +0300
committerRémy Coutable <remy@rymai.me>2018-07-12 12:26:09 +0300
commit37af75a2e024bf35f09e6f014626019e960ad9b9 (patch)
treef156e2fc0ced165327e9a48ce3ae153608ff2bb4 /lib/api
parentd2c5ac61cd964e6c3ff22021734002b6e591a128 (diff)
Resolve "do not set updated_at when creating note"
Diffstat (limited to 'lib/api')
-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