summaryrefslogtreecommitdiff
path: root/app/models/application_setting.rb
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2017-02-15 00:19:36 +0800
committerLin Jen-Shin <godfat@godfat.org>2017-02-15 15:31:51 +0800
commit602f3b84c08c06cd132a8c53c7bcbb3a139cebfd (patch)
tree2072a43655467065a28204ea9fbd2324703245b2 /app/models/application_setting.rb
parent4eff5eb89fc6eec5692f4119b2fc3c9622d1b3e3 (diff)
downloadgitlab-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.rb8
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