diff options
author | Aleksander Machniak <machniak@kolabsys.com> | 2018-08-20 09:54:17 +0200 |
---|---|---|
committer | Aleksander Machniak <machniak@kolabsys.com> | 2018-08-20 09:54:17 +0200 |
commit | 68bbebeb10ff8d3c78ff7f1121f646ebf27ee00a (patch) | |
tree | 60755b2ca1931528d847359f56f7303c832c491c | |
parent | 11c1ad7145051ebc323c93414a822690656f4d7e (diff) | |
download | pykolab-68bbebeb10ff8d3c78ff7f1121f646ebf27ee00a.tar.gz |
Fix exception when handling iTip CANCEL for a reasource event (Bifrost#T123747)
-rw-r--r-- | wallace/module_resources.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/wallace/module_resources.py b/wallace/module_resources.py index 1abbcd3..7509efd 100644 --- a/wallace/module_resources.py +++ b/wallace/module_resources.py @@ -334,12 +334,14 @@ def execute(*args, **kw): if resources[resource]['mail'] in [a.get_email() for a in itip_event['xml'].get_attendees()] \ and resources[resource].has_key('kolabtargetfolder'): (event, master) = find_existing_event(itip_event['uid'], itip_event['recurrence-id'], resources[resource]) + if event is None: + log.debug(_("Cancellation for an event %r: not found, skipping") % (itip_event['uid']), level=8) # remove entire event - if event and master is None: + elif master is None: log.debug(_("Cancellation for entire event %r: deleting") % (itip_event['uid']), level=8) delete_resource_event(itip_event['uid'], resources[resource], event._msguid) # just cancel one single occurrence: add exception with status=cancelled - elif master is not None: + else: log.debug(_("Cancellation for a single occurrence %r of %r: updating...") % (itip_event['recurrence-id'], itip_event['uid']), level=8) event.set_status('CANCELLED') event.set_transparency(True) |