Commit ebb7c22a authored by Birte Kristina Friesel's avatar Birte Kristina Friesel
Browse files

checkin api: only set comment if checkin was successful

parent 2831fbdf
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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 );
		}