1.1 --- a/imipweb/event.py Tue Mar 31 20:21:14 2015 +0200
1.2 +++ b/imipweb/event.py Wed Apr 01 00:00:16 2015 +0200
1.3 @@ -73,33 +73,43 @@
1.4 self.redirect(self.env.get_path())
1.5 return None
1.6
1.7 - # Update the object.
1.8 -
1.9 - if args.has_key("summary"):
1.10 - obj["SUMMARY"] = [(args["summary"][0], {})]
1.11 -
1.12 - attendees = uri_dict(obj.get_value_map("ATTENDEE"))
1.13 -
1.14 - if args.has_key("partstat"):
1.15 - if attendees.has_key(self.user):
1.16 - attendees[self.user]["PARTSTAT"] = args["partstat"][0]
1.17 - if attendees[self.user].has_key("RSVP"):
1.18 - del attendees[self.user]["RSVP"]
1.19 -
1.20 is_organiser = get_uri(obj.get_value("ORGANIZER")) == self.user
1.21
1.22 # Obtain the user's timezone and process datetime values.
1.23
1.24 update = False
1.25 + periods = None
1.26
1.27 if is_organiser:
1.28 periods, errors = self.handle_all_period_controls()
1.29 if errors:
1.30 return errors
1.31 - elif periods:
1.32 +
1.33 + # Update the object.
1.34 +
1.35 + if reply or invite or cancel or save:
1.36 +
1.37 + # Update time periods (main and recurring).
1.38 +
1.39 + if periods:
1.40 self.set_period_in_object(obj, periods[0])
1.41 self.set_periods_in_object(obj, periods[1:])
1.42
1.43 + # Update summary.
1.44 +
1.45 + if args.has_key("summary"):
1.46 + obj["SUMMARY"] = [(args["summary"][0], {})]
1.47 +
1.48 + # Update attendee participation.
1.49 +
1.50 + attendees = uri_dict(obj.get_value_map("ATTENDEE"))
1.51 +
1.52 + if args.has_key("partstat"):
1.53 + if attendees.has_key(self.user):
1.54 + attendees[self.user]["PARTSTAT"] = args["partstat"][0]
1.55 + if attendees[self.user].has_key("RSVP"):
1.56 + del attendees[self.user]["RSVP"]
1.57 +
1.58 # Obtain any participants to be added or removed.
1.59
1.60 removed = args.get("remove")