Commit 797887c0 authored by Ludovico's avatar Ludovico

more cleanup

parent 76b382a0
......@@ -11,7 +11,7 @@ class WaitingTimeFactory():
:param time2:
:return timediff.seconds:
"""
datetime1 = datetime.datetime(1970,1,1,time1.hour,time1.minute,time1.second)
datetime1 = datetime.datetime(1970,1,1,time1.hour, time1.minute,time1.second)
datetime2 = datetime.datetime(1970,1,1,time2.hour, time2.minute, time2.second)
time_difference = datetime1-datetime2
if time_difference.days == 0:
......@@ -27,7 +27,7 @@ class WaitingTimeFactory():
:return:
"""
print("test")
observed_times = ObservedWaitingTime.objects.filter(day_of_the_week=estimated_time.day_of_the_week)
observed_times = ObservedWaitingTime.objects.filter(day_of_the_week=estimated_time.day_of_the_week, location= estimated_time.location)
average_waiting_time,relevant_waiting_times=0,0
for observed_time in observed_times:
time_difference = self.time_distance(estimated_time.time, observed_time.timestamp.time())
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment