aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers/time_tables_controller.rb
diff options
context:
space:
mode:
authorTeddy Wing2017-07-21 12:23:19 +0200
committerTeddy Wing2017-07-21 15:59:53 +0200
commit1dc71242b81f6bdcde4c5e093c36124011599675 (patch)
tree05e26240032739b711f20493084e4938bd688b50 /app/controllers/time_tables_controller.rb
parenta62c80f08417ff337cdabbd997e2f9bbae44e6b3 (diff)
downloadchouette-core-1dc71242b81f6bdcde4c5e093c36124011599675.tar.bz2
VehicleJourneyAtStop: Handle nil value when checking offset within range
Old `VehicleJourneyAtStop`s were created before I added a database default of 0 to those records. Thus old data will not have the proper 0 value to check against, and our `<` `>` comparisons trigger an error due to a comparison with `nil`. To get around the error, set a default value of 0 (the current day) when the offset isn't set. I think that ideally this should be solved at the database level with a data migration, but hopefully this is okay for now. Whenever we do decide to do a data migration, however, this code needs to be deleted. Refs #3597
Diffstat (limited to 'app/controllers/time_tables_controller.rb')
0 files changed, 0 insertions, 0 deletions