# HG changeset patch # User Paul Boddie # Date 1444082947 -7200 # Node ID eb49f6382f80419d5b5b08a80a0fb16e3d33ec02 # Parent 2322744f419ffc56a50a520a00fb0f49795529eb Return to the event after declining a counter-proposal. diff -r 2322744f419f -r eb49f6382f80 imipweb/event.py --- a/imipweb/event.py Tue Oct 06 00:03:42 2015 +0200 +++ b/imipweb/event.py Tue Oct 06 00:09:07 2015 +0200 @@ -716,25 +716,7 @@ save = args.has_key("save") decline = filter(None, [(arg.startswith("decline-") and arg[len("decline-"):]) for arg in args.keys()]) - # Decline a counter-proposal. - - if decline: - for s in decline: - try: - i = int(s) - except (IndexError, ValueError): - pass - else: - attendee_uri = get_uri(args.get("decline", [])[i]) - self.process_declined_counter(attendee_uri) - - # Update the counter-proposals synchronously instead of - # assuming that the outgoing handler will have done so - # before the form is refreshed. - - self.remove_counter(attendee_uri) - - have_action = reply or discard or create or cancel or ignore or save + have_action = reply or discard or create or cancel or ignore or save or decline if not have_action: return ["action"] @@ -830,6 +812,29 @@ self.remove_event(self.uid, self.recurrenceid) self.remove_request(self.uid, self.recurrenceid) + # Decline a counter-proposal. + + elif decline: + for s in decline: + try: + i = int(s) + except (IndexError, ValueError): + pass + else: + attendee_uri = get_uri(args.get("decline", [])[i]) + self.process_declined_counter(attendee_uri) + + # Update the counter-proposals synchronously instead of + # assuming that the outgoing handler will have done so + # before the form is refreshed. + + self.remove_counter(attendee_uri) + + # Redirect to the event. + + self.redirect(self.env.get_url()) + handled = False + else: handled = False