diff options
| author | Lin Jen-Shin <godfat@godfat.org> | 2017-02-14 23:47:23 +0800 |
|---|---|---|
| committer | Lin Jen-Shin <godfat@godfat.org> | 2017-02-15 15:31:51 +0800 |
| commit | 4eff5eb89fc6eec5692f4119b2fc3c9622d1b3e3 (patch) | |
| tree | 67299923b66409c2e7b20dc5ac20e63df147847b | |
| parent | a1b06a82eac888024dc0d4c77f7c93f6053a3815 (diff) | |
| download | gitlab-ce-4eff5eb89fc6eec5692f4119b2fc3c9622d1b3e3.tar.gz | |
Check default_artifacts_expire_in only if existed
| -rw-r--r-- | app/models/application_setting.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/models/application_setting.rb b/app/models/application_setting.rb index 2b97027c018..818223dcc86 100644 --- a/app/models/application_setting.rb +++ b/app/models/application_setting.rb @@ -298,7 +298,8 @@ class ApplicationSetting < ActiveRecord::Base end def check_default_artifacts_expire_in - ChronicDuration.parse(default_artifacts_expire_in) + ChronicDuration.parse(default_artifacts_expire_in) if + default_artifacts_expire_in true rescue ChronicDuration::DurationParseError => e errors.add(:default_artifacts_expire_in, ": #{e.message}") |
