diff options
author | Lin Jen-Shin <godfat@godfat.org> | 2017-02-15 00:19:36 +0800 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2017-02-15 15:31:51 +0800 |
commit | 602f3b84c08c06cd132a8c53c7bcbb3a139cebfd (patch) | |
tree | 2072a43655467065a28204ea9fbd2324703245b2 /app/models/application_setting.rb | |
parent | 4eff5eb89fc6eec5692f4119b2fc3c9622d1b3e3 (diff) | |
download | gitlab-ce-602f3b84c08c06cd132a8c53c7bcbb3a139cebfd.tar.gz |
Add a few more tests and make sure empty value sets to nil
Diffstat (limited to 'app/models/application_setting.rb')
-rw-r--r-- | app/models/application_setting.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/app/models/application_setting.rb b/app/models/application_setting.rb index 818223dcc86..17193036fb6 100644 --- a/app/models/application_setting.rb +++ b/app/models/application_setting.rb @@ -269,6 +269,14 @@ class ApplicationSetting < ActiveRecord::Base self.repository_storages = [value] end + def default_artifacts_expire_in=(value) + if value.present? + super(value.strip) + else + super(nil) + end + end + # Choose one of the available repository storage options. Currently all have # equal weighting. def pick_repository_storage |