Commit 4eff5eb8 authored by Lin Jen-Shin's avatar Lin Jen-Shin

Check default_artifacts_expire_in only if existed

parent a1b06a82
...@@ -298,7 +298,8 @@ class ApplicationSetting < ActiveRecord::Base ...@@ -298,7 +298,8 @@ class ApplicationSetting < ActiveRecord::Base
end end
def check_default_artifacts_expire_in def check_default_artifacts_expire_in
ChronicDuration.parse(default_artifacts_expire_in) ChronicDuration.parse(default_artifacts_expire_in) if
default_artifacts_expire_in
true true
rescue ChronicDuration::DurationParseError => e rescue ChronicDuration::DurationParseError => e
errors.add(:default_artifacts_expire_in, ": #{e.message}") errors.add(:default_artifacts_expire_in, ": #{e.message}")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment