1.1 --- a/imip_manager.py Thu Feb 05 23:03:45 2015 +0100
1.2 +++ b/imip_manager.py Thu Feb 05 23:18:54 2015 +0100
1.3 @@ -474,9 +474,11 @@
1.4 obj["SUMMARY"] = [(args["summary"][0], {})]
1.5
1.6 if args.has_key("partstat"):
1.7 + organisers = obj.get_value_map("ORGANIZER")
1.8 attendees = obj.get_value_map("ATTENDEE")
1.9 - if attendees.has_key(self.user):
1.10 - attendees[self.user]["PARTSTAT"] = args["partstat"][0]
1.11 + d = attendees.has_key(self.user) and attendees or organisers.has_key(self.user) and organisers or None
1.12 + if d:
1.13 + d[self.user]["PARTSTAT"] = args["partstat"][0]
1.14
1.15 # Process any action.
1.16
1.17 @@ -546,10 +548,6 @@
1.18 # Show appropriate options depending on the role of the user.
1.19
1.20 if is_attendee and not is_organiser:
1.21 - partstat = attendee_attr.get("PARTSTAT")
1.22 - if not partstat:
1.23 - page.p("This request has not yet been dealt with.")
1.24 -
1.25 if needs_update:
1.26 page.p("This request can be updated as follows:")
1.27 else:
1.28 @@ -601,6 +599,7 @@
1.29 ("ACCEPTED", "Attending"),
1.30 ("TENTATIVE", "Tentatively attending"),
1.31 ("DECLINED", "Not attending"),
1.32 + ("DELEGATED", "Delegated"),
1.33 ]
1.34
1.35 def show_object_on_page(self, uid, obj, needs_update):
1.36 @@ -676,7 +675,7 @@
1.37 else:
1.38 first = False
1.39
1.40 - if name == "ATTENDEE":
1.41 + if name in ("ATTENDEE", "ORGANIZER"):
1.42 page.td(class_="objectattribute")
1.43 page.add(value)
1.44 page.td.close()