aboutsummaryrefslogtreecommitdiffstats
path: root/app/models/chouette/purchase_window.rb
diff options
context:
space:
mode:
authorZog2018-04-13 15:39:27 +0200
committercedricnjanga2018-04-16 06:34:37 -0700
commitac508f15b191a28a6582a8acb4d177fd20b9baa2 (patch)
treecd4053afa773fda975058ad3926663a4131a8cfd /app/models/chouette/purchase_window.rb
parent51125f25847db2bb2c654c1bbfd1fd39295693f6 (diff)
downloadchouette-core-ac508f15b191a28a6582a8acb4d177fd20b9baa2.tar.bz2
Refs #6450; Don't consider the empty string as a valid color for Timetables
Same for PurchazeWindows
Diffstat (limited to 'app/models/chouette/purchase_window.rb')
-rw-r--r--app/models/chouette/purchase_window.rb7
1 files changed, 4 insertions, 3 deletions
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