summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2016-09-19 10:01:45 +0000
committerRémy Coutable <remy@rymai.me>2016-09-19 10:01:45 +0000
commit6a9d87b523b2db9561d70fce1c19584c90b289a8 (patch)
tree43281448837da0654959e9a362fe5ed650075c04 /app
parent661c464cff6cd59709d18c263a954431e36f17ca (diff)
parent58d02520b037255f9948de4386ab6cd970586445 (diff)
downloadgitlab-ce-6a9d87b523b2db9561d70fce1c19584c90b289a8.tar.gz
Merge branch '22033-milestone-validation-returns-422' into 'master'
Ensure validation messages are shown within the milestone form Fixes a bug where upon entering data to create an invalid milestone via the Web UI or the API would raise an exception rather than render the validation messages We'd rather render the validation messages to inform the user than raise an exception and result in a 422 error being displayed Closes #22033 See merge request !6345
Diffstat (limited to 'app')
-rw-r--r--app/services/milestones/create_service.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/services/milestones/create_service.rb b/app/services/milestones/create_service.rb
index 3b90399af64..b8e08c9f1eb 100644
--- a/app/services/milestones/create_service.rb
+++ b/app/services/milestones/create_service.rb
@@ -3,7 +3,7 @@ module Milestones
def execute
milestone = project.milestones.new(params)
- if milestone.save!
+ if milestone.save
event_service.open_milestone(milestone, current_user)
end