Fix sync if it contains cancelled events.
This commit is contained in:
parent
a1ae079e8a
commit
5e0ff701da
1 changed files with 5 additions and 1 deletions
6
main.py
6
main.py
|
@ -157,7 +157,11 @@ def main(config, dryrun, level, range):
|
|||
if not any(source_results):
|
||||
logger.error('event get failed for all sources')
|
||||
return 1
|
||||
logger.info("syncing %d events", len(events))
|
||||
# filter cancelled events
|
||||
logger.info('found %d events', len(events))
|
||||
logger.info('not syncing cancelled events')
|
||||
events = [e for e in events if e['status'] != 'cancelled']
|
||||
logger.info('syncing %d events', len(events))
|
||||
|
||||
# post events
|
||||
if dryrun:
|
||||
|
|
Loading…
Reference in a new issue