diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-07-27 22:40:43 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-07-27 22:40:43 +0000 |
commit | bbe511b231b5de3fab4dc418601c89cc1ccc8063 (patch) | |
tree | 650453c3b64751df39fda6f33ca4b39318f41e0d /app/services | |
parent | ad1c34c03de42ebc5279f338f6304e77930d34d4 (diff) | |
download | gitlab-ce-bbe511b231b5de3fab4dc418601c89cc1ccc8063.tar.gz |
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.rb | 4 |
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) |