diff options
author | Daniel Friesel <derf@finalrewind.org> | 2019-12-20 16:18:32 +0100 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2019-12-20 16:18:32 +0100 |
commit | ebb7c22a4b5c3666e979e14808c3baceb1b631a3 (patch) | |
tree | 8af3ee53031c380dfd6deff99e9b294aa763e74e | |
parent | 2831fbdfb7d2263f145d5130c8ffb972eca51a9a (diff) |
checkin api: only set comment if checkin was successful
-rwxr-xr-x | lib/Travelynx/Controller/Api.pm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Travelynx/Controller/Api.pm b/lib/Travelynx/Controller/Api.pm index f541c98..f5ea3e4 100755 --- a/lib/Travelynx/Controller/Api.pm +++ b/lib/Travelynx/Controller/Api.pm @@ -282,7 +282,7 @@ sub travel_v1 { my ( $train, $error ) = $self->checkin( $from_station, $train_id, $uid ); - if ( $payload->{comment} ) { + if ( $payload->{comment} and not $error ) { $self->update_in_transit_comment( sanitize( q{}, $payload->{comment} ), $uid ); } |