Skip to content

Commit e6e2614

Browse files
author
Stanislav Kolotinskiy
committed
Set empty defaults for insights date format and time format
1 parent a1c46ea commit e6e2614

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/travis/api/v3/models/user_preferences.rb

+4-4
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ class Models::UserPreferences < Models::JsonSlice
1818

1919
attribute :insights_time_zone, String, default: ''
2020

21-
attribute :insights_date_format, String, default: 'DD/MM/YYYY'
22-
validates :insights_date_format, inclusion: { in: %w{DD/MM/YYYY MM/DD/YYYY YYYY/MM/DD}, message: "'%{value}' is not allowed" }
21+
attribute :insights_date_format, String, default: ''
22+
validates :insights_date_format, inclusion: { in: %w{DD/MM/YYYY MM/DD/YYYY YYYY/MM/DD}, message: "'%{value}' is not allowed" }, allow_blank: true
2323

24-
attribute :insights_time_format, String, default: 'HH:mm:ss'
25-
validates :insights_time_format, inclusion: { in: ['h:mm:ss A', 'HH:mm:ss'], message: "'%{value}' is not allowed" }
24+
attribute :insights_time_format, String, default: ''
25+
validates :insights_time_format, inclusion: { in: ['h:mm:ss A', 'HH:mm:ss'], message: "'%{value}' is not allowed" }, allow_blank: true
2626
end
2727
end

0 commit comments

Comments
 (0)