mirror of
https://github.com/wahyd4/gitlabhq.git
synced 2026-08-13 14:46:05 +10:00
Save only valid record in service migrations
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
This commit is contained in:
@@ -23,7 +23,7 @@ class SerializeServiceProperties < ActiveRecord::Migration
|
||||
associations[service.type.to_sym].each do |attribute|
|
||||
service.send("#{attribute}=", service.attributes[attribute.to_s])
|
||||
end
|
||||
service.save(validate: false)
|
||||
service.save
|
||||
end
|
||||
|
||||
remove_column :services, :project_url, :string
|
||||
|
||||
@@ -10,7 +10,7 @@ class MoveSlackServiceToWebhook < ActiveRecord::Migration
|
||||
slack_service.properties.delete('subdomain')
|
||||
# Room is configured on the Slack side
|
||||
slack_service.properties.delete('room')
|
||||
slack_service.save!
|
||||
slack_service.save
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user