mirror of
https://github.com/b4tman/sync_ics2gcal
synced 2025-01-21 07:28:24 +00:00
fix sets in events_list_compare
This commit is contained in:
parent
5d84728de3
commit
1cd7baf08c
@ -32,12 +32,12 @@ class CalendarSync():
|
||||
|
||||
def get_key(item): return item[key]
|
||||
|
||||
keys_src = list(map(get_key, items_src))
|
||||
keys_dst = list(map(get_key, items_dst))
|
||||
keys_src = set(map(get_key, items_src))
|
||||
keys_dst = set(map(get_key, items_dst))
|
||||
|
||||
keys_to_insert = set(keys_src) - set(keys_dst)
|
||||
keys_to_update = set(keys_src) & set(keys_dst)
|
||||
keys_to_delete = set(keys_dst) - set(keys_src)
|
||||
keys_to_insert = keys_src - keys_dst
|
||||
keys_to_update = keys_src & keys_dst
|
||||
keys_to_delete = keys_dst - keys_src
|
||||
|
||||
def items_by_keys(items, key_name, keys):
|
||||
return list(filter(lambda item: item[key_name] in keys, items))
|
||||
|
Loading…
Reference in New Issue
Block a user