pkoers / Agora

Application to help streamline the handling of flights operated by a wet lease company within the company operations.
GNU General Public License v3.0
1 stars 0 forks source link

the station_array definition is not working #13

Closed pkoers closed 1 year ago

pkoers commented 1 year ago

station = Station.find_by(iata_station_code: origin).id

The above code is causing an issue when it's NIL, maybe this can be fixed by a .nil? function.

For now, the def has been disabled, not causing any further operational issues.

pkoers commented 1 year ago

station = Station.find_by(iata_station_code: station).try(:id) station ||= 99999

This should work

pkoers commented 1 year ago

It works, test passed, code has been committed