1
0
mirror of https://github.com/b4tman/sync_ics2gcal synced 2025-01-21 07:28:24 +00:00

overwrite events without updated field

This commit is contained in:
Dmitry Belyaev 2022-02-22 10:15:05 +03:00
parent b09136747f
commit 693c6c4359
Signed by: b4tman
GPG Key ID: 41A00BF15EA7E5F3

View File

@ -72,6 +72,8 @@ class CalendarSync:
def filter_updated(event_tuple: EventTuple) -> bool:
new, old = event_tuple
if 'updated' not in new or 'updated' not in old:
return True
new_date = dateutil.parser.parse(new['updated'])
old_date = dateutil.parser.parse(old['updated'])
return new_date > old_date