diff options
author | Shinya Maeda <gitlab.shinyamaeda@gmail.com> | 2017-05-17 21:26:18 +0900 |
---|---|---|
committer | Shinya Maeda <gitlab.shinyamaeda@gmail.com> | 2017-05-30 23:55:09 +0900 |
commit | df6040bbd41a639b3d0aa339b2dc0e84d67b811b (patch) | |
tree | ce38cc4c45b360436ec3fa4d850ef46281415e2c /lib/api/pipeline_schedules.rb | |
parent | c7fc65e0672a3c88e15f033be3b4d4258bc36e2f (diff) | |
download | gitlab-ce-df6040bbd41a639b3d0aa339b2dc0e84d67b811b.tar.gz |
zj keen eye2
Diffstat (limited to 'lib/api/pipeline_schedules.rb')
-rw-r--r-- | lib/api/pipeline_schedules.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/api/pipeline_schedules.rb b/lib/api/pipeline_schedules.rb index 9429306fe20..58888417888 100644 --- a/lib/api/pipeline_schedules.rb +++ b/lib/api/pipeline_schedules.rb @@ -54,7 +54,7 @@ module API .new(user_project, current_user, declared_params(include_missing: false)) .execute - if pipeline_schedule.valid? + if pipeline_schedule.persisted? present pipeline_schedule, with: Entities::PipelineSchedule else render_validation_error!(pipeline_schedule) @@ -98,7 +98,6 @@ module API return not_found!('PipelineSchedule') unless pipeline_schedule if pipeline_schedule.own!(current_user) - status :ok present pipeline_schedule, with: Entities::PipelineSchedule else render_validation_error!(pipeline_schedule) |