diff options
Diffstat (limited to 'lib/Travelynx/Model')
-rwxr-xr-x | lib/Travelynx/Model/Journeys.pm | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Travelynx/Model/Journeys.pm b/lib/Travelynx/Model/Journeys.pm index 6884ae7..b15507f 100755 --- a/lib/Travelynx/Model/Journeys.pm +++ b/lib/Travelynx/Model/Journeys.pm @@ -254,7 +254,8 @@ sub add_from_in_transit { $journey->{edited} = 0; $journey->{checkout_time} = DateTime->now( time_zone => 'Europe/Berlin' ); - $db->insert( 'journeys', $journey ); + return $db->insert( 'journeys', $journey, { returning => 'id' } ) + ->hash->{id}; } sub update { |