Merge branch 'dm-ensure-import-state-persisted' into 'master'
Don't create import_state until project is persisted See merge request gitlab-org/gitlab-ce!18803
This commit is contained in:
commit
7dddff1ed5
1 changed files with 8 additions and 2 deletions
|
@ -661,9 +661,15 @@ class Project < ActiveRecord::Base
|
|||
return if !force && (self[:import_status] == 'none' || self[:import_status].nil?)
|
||||
return unless import_state.nil?
|
||||
|
||||
create_import_state(import_state_args)
|
||||
if persisted?
|
||||
create_import_state(import_state_args)
|
||||
|
||||
update_column(:import_status, 'none')
|
||||
update_column(:import_status, 'none')
|
||||
else
|
||||
build_import_state(import_state_args)
|
||||
|
||||
self[:import_status] = 'none'
|
||||
end
|
||||
end
|
||||
|
||||
def import_schedule
|
||||
|
|
Loading…
Reference in a new issue