Skip to content

Commit

Permalink
⚙️ hotfix: remove predicao de pontos iniciais das trips (#163)
Browse files Browse the repository at this point in the history
  • Loading branch information
fernandascovino authored Mar 30, 2023
1 parent ca90b64 commit 5fd0da8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mobilidade_rio/mobilidade_rio/predictor/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from shapely.geometry import LineString, Point
from shapely.ops import snap, split, transform
from django.utils import timezone
from django.db.models import Q
import pandas as pd
from mobilidade_rio.pontos.models import (
Stops,
Expand Down Expand Up @@ -271,7 +272,7 @@ def run_eta(self):
# calculate ETA for all stops of the trip
stop_ids = list(StopTimes.objects.filter(
trip_id__trip_short_name=trip_short_name, trip_id__direction_id=direction_id
).values_list("stop_id", flat=True))
).filter(~Q(stop_sequence=0)).values_list("stop_id", flat=True))
stops = Stops.objects.filter(
stop_id__in=stop_ids,
)
Expand Down

0 comments on commit 5fd0da8

Please sign in to comment.