diff options
author | Semyon Pupkov <mail@semyonpupkov.com> | 2019-02-01 12:51:08 +0500 |
---|---|---|
committer | Semyon Pupkov <mail@semyonpupkov.com> | 2019-02-01 14:04:26 +0500 |
commit | 63d220f237486ad0865873ccb52d3abfede386b7 (patch) | |
tree | cb0d3187f851e1784d8a766abbb81ae905f241fe /app | |
parent | 9a0dd375f38384ea70448e4da945e6864b923c4d (diff) | |
download | gitlab-ce-63d220f237486ad0865873ccb52d3abfede386b7.tar.gz |
Fix ReturnInVoidContext rubocop offense
Diffstat (limited to 'app')
-rw-r--r-- | app/models/project.rb | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/app/models/project.rb b/app/models/project.rb index b385b89449d..e55a57e46ef 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -738,11 +738,13 @@ class Project < ActiveRecord::Base end def import_url=(value) - return super(value) unless Gitlab::UrlSanitizer.valid?(value) - - import_url = Gitlab::UrlSanitizer.new(value) - super(import_url.sanitized_url) - create_or_update_import_data(credentials: import_url.credentials) + if Gitlab::UrlSanitizer.valid?(value) + import_url = Gitlab::UrlSanitizer.new(value) + super(import_url.sanitized_url) + create_or_update_import_data(credentials: import_url.credentials) + else + super(value) + end end def import_url |