diff options
author | Stan Hu <stanhu@gmail.com> | 2019-06-04 01:04:59 +0300 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2019-06-04 01:27:24 +0300 |
commit | cfaf012c532a269a230f67b31e623b18e3f8f8b1 (patch) | |
tree | deba08e3288c5b5cb33a457607923989fe8137f2 /app/controllers | |
parent | 98e1f7d5da8c429e3b8747825e2507bfe464e92c (diff) |
Fix project settings not being able to update
Previously import_url would always be present in the update parameters,
which would cause the validation to fail. We now only include this
parameter only if there is URL given.
Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/62708
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/concerns/import_url_params.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/app/controllers/concerns/import_url_params.rb b/app/controllers/concerns/import_url_params.rb index 765654ca2cb..e51e4157f50 100644 --- a/app/controllers/concerns/import_url_params.rb +++ b/app/controllers/concerns/import_url_params.rb @@ -2,6 +2,8 @@ module ImportUrlParams def import_url_params + return {} unless params.dig(:project, :import_url).present? + { import_url: import_params_to_full_url(params[:project]) } end |