Commit 0674d4e3 authored by Mohd Bilal's avatar Mohd Bilal
Browse files

changed duplicate removal to 1 line

parent 13beff02
......@@ -415,8 +415,8 @@ class Station(ThreadedModule):
if existing_schedule is not None:
json_schedule = existing_schedule[schedule_type]
if json_schedule:
updated_overpasses = list(filter(lambda x: any([o for o in schedule if o['uid']==x['uid']]), json_schedule))
existing_schedule[schedule_type] = [o for o in json_schedule if o not in updated_overpasses]
existing_schedule[schedule_type] = list(filter(lambda x: not any([o for o in schedule if o['uid']==x['uid']]), json_schedule))
#existing_schedule[schedule_type] = [o for o in json_schedule if o not in updated_overpasses]
existing_schedule[schedule_type].extend(schedule)
else:
settings.update({"schedule": {schedule_type: schedule}})
......
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