overwrite events without `updated` field
This commit is contained in:
parent
b09136747f
commit
693c6c4359
|
@ -72,6 +72,8 @@ class CalendarSync:
|
||||||
|
|
||||||
def filter_updated(event_tuple: EventTuple) -> bool:
|
def filter_updated(event_tuple: EventTuple) -> bool:
|
||||||
new, old = event_tuple
|
new, old = event_tuple
|
||||||
|
if 'updated' not in new or 'updated' not in old:
|
||||||
|
return True
|
||||||
new_date = dateutil.parser.parse(new['updated'])
|
new_date = dateutil.parser.parse(new['updated'])
|
||||||
old_date = dateutil.parser.parse(old['updated'])
|
old_date = dateutil.parser.parse(old['updated'])
|
||||||
return new_date > old_date
|
return new_date > old_date
|
||||||
|
|
Loading…
Reference in New Issue