Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-07-28 01:40:43 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-07-28 01:40:43 +0300
commitbbe511b231b5de3fab4dc418601c89cc1ccc8063 (patch)
tree650453c3b64751df39fda6f33ca4b39318f41e0d /app/services
parentad1c34c03de42ebc5279f338f6304e77930d34d4 (diff)
Add latest changes from gitlab-org/gitlab@14-1-stable-ee
Diffstat (limited to 'app/services')
-rw-r--r--app/services/application_settings/update_service.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/services/application_settings/update_service.rb b/app/services/application_settings/update_service.rb
index 0f2099793ea..7728982779e 100644
--- a/app/services/application_settings/update_service.rb
+++ b/app/services/application_settings/update_service.rb
@@ -67,8 +67,10 @@ module ApplicationSettings
end
def update_terms(terms)
+ return unless terms.present?
+
# Avoid creating a new terms record if the text is exactly the same.
- terms = terms&.strip
+ terms = terms.strip
return if terms == @application_setting.terms
ApplicationSetting::Term.create(terms: terms)