mirror of
https://github.com/aljazceru/python-teos.git
synced 2025-12-17 14:14:22 +01:00
Prevents adding the same uuid twice in the map (appointment update)
This commit is contained in:
@@ -115,6 +115,8 @@ class Watcher:
|
|||||||
self.appointments[uuid] = {"locator": appointment.locator, "end_time": appointment.end_time}
|
self.appointments[uuid] = {"locator": appointment.locator, "end_time": appointment.end_time}
|
||||||
|
|
||||||
if appointment.locator in self.locator_uuid_map:
|
if appointment.locator in self.locator_uuid_map:
|
||||||
|
# If the uuid is already in the map it means this is an update.
|
||||||
|
if uuid not in self.locator_uuid_map[appointment.locator]:
|
||||||
self.locator_uuid_map[appointment.locator].append(uuid)
|
self.locator_uuid_map[appointment.locator].append(uuid)
|
||||||
|
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in New Issue
Block a user