summaryrefslogtreecommitdiff
path: root/lib/Travelynx
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Travelynx')
-rwxr-xr-xlib/Travelynx/Controller/Api.pm2
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 );
}