Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
heptapod
heptapod
Commits
303c2efda5b6
Commit
202ce80b
authored
May 08, 2018
by
Douwe Maan
Browse files
Don't create import_state until project is persisted
parent
6e8489bfa8ab
Changes
1
Show whitespace changes
Inline
Side-by-side
app/models/project.rb
View file @
303c2efd
...
@@ -661,9 +661,15 @@ def ensure_import_state(force: false)
...
@@ -661,9 +661,15 @@ def ensure_import_state(force: false)
return
if
!
force
&&
(
self
[
:import_status
]
==
'none'
||
self
[
:import_status
].
nil?
)
return
if
!
force
&&
(
self
[
:import_status
]
==
'none'
||
self
[
:import_status
].
nil?
)
return
unless
import_state
.
nil?
return
unless
import_state
.
nil?
if
persisted?
create_import_state
(
import_state_args
)
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
end
def
import_schedule
def
import_schedule
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment