summaryrefslogtreecommitdiff
path: root/app/models
diff options
context:
space:
mode:
authorShinya Maeda <shinya@gitlab.com>2017-06-26 02:59:27 +0900
committerShinya Maeda <shinya@gitlab.com>2017-07-05 18:38:10 +0900
commite364c118a05e4d11677b997a5e31b2f1aa8a4a92 (patch)
tree7368867777be0469c3e9d3128a1d5d171d396971 /app/models
parent507fedf3c39dbe6d2efff789d98b7b29ff9428a3 (diff)
downloadgitlab-ce-e364c118a05e4d11677b997a5e31b2f1aa8a4a92.tar.gz
Implement variables_attributes create/update cases
Diffstat (limited to 'app/models')
-rw-r--r--app/models/ci/pipeline_schedule.rb10
1 files changed, 0 insertions, 10 deletions
diff --git a/app/models/ci/pipeline_schedule.rb b/app/models/ci/pipeline_schedule.rb
index 61215b1fb46..06b2b981252 100644
--- a/app/models/ci/pipeline_schedule.rb
+++ b/app/models/ci/pipeline_schedule.rb
@@ -15,7 +15,6 @@ module Ci
validates :cron_timezone, cron_timezone: true, presence: { unless: :importing? }
validates :ref, presence: { unless: :importing? }
validates :description, presence: true
- validates_associated :variables
before_save :set_next_run_at
@@ -24,15 +23,6 @@ module Ci
accepts_nested_attributes_for :variables, allow_destroy: true
- before_validation(on: :update) do
- # TODO: if validation failed, restore the deleted_obj
- deleted_obj = Ci::PipelineScheduleVariable.where(pipeline_schedule_id: self).destroy_all
- end
-
- after_validation(on: :update) do
- # TODO: if validation failed, restore the deleted_obj
- end
-
def owned_by?(current_user)
owner == current_user
end