Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
dd639550
Commit
dd639550
authored
Jul 13, 2016
by
James Lopez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updated create_or_update_import_data to use guard clause
parent
0b2469a4
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
app/models/project.rb
app/models/project.rb
+3
-1
No files found.
app/models/project.rb
View file @
dd639550
...
...
@@ -465,7 +465,7 @@ class Project < ActiveRecord::Base
import_url
=
Gitlab
::
UrlSanitizer
.
new
(
value
)
super
(
import_url
.
sanitized_url
)
create_or_update_import_data
(
credentials:
import_url
.
credentials
)
if
valid_import_url?
create_or_update_import_data
(
credentials:
import_url
.
credentials
)
end
def
import_url
...
...
@@ -482,6 +482,8 @@ class Project < ActiveRecord::Base
end
def
create_or_update_import_data
(
data:
nil
,
credentials:
nil
)
return
unless
valid_import_url?
project_import_data
=
import_data
||
build_import_data
if
data
project_import_data
.
data
||=
{}
...
...
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