From 4eff5eb89fc6eec5692f4119b2fc3c9622d1b3e3 Mon Sep 17 00:00:00 2001 From: Lin Jen-Shin Date: Tue, 14 Feb 2017 23:47:23 +0800 Subject: Check default_artifacts_expire_in only if existed --- app/models/application_setting.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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}") -- cgit v1.2.1