From ac508f15b191a28a6582a8acb4d177fd20b9baa2 Mon Sep 17 00:00:00 2001 From: Zog Date: Fri, 13 Apr 2018 15:39:27 +0200 Subject: Refs #6450; Don't consider the empty string as a valid color for Timetables Same for PurchazeWindows --- app/models/chouette/purchase_window.rb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'app/models/chouette/purchase_window.rb') diff --git a/app/models/chouette/purchase_window.rb b/app/models/chouette/purchase_window.rb index e10b106ec..d22674637 100644 --- a/app/models/chouette/purchase_window.rb +++ b/app/models/chouette/purchase_window.rb @@ -46,8 +46,9 @@ module Chouette ] end - # def checksum_attributes - # end - + def color + _color = read_attribute(:color) + _color.present? ? _color : nil + end end end -- cgit v1.2.3