Ticket #1103 (closed defect: fixed)

Opened 14 years ago

Last modified 14 years ago

Event display borks when getCurrentUserAttendee returns none.

Reported by: Brian Sutherland <jinty@…> Owned by: lregebro
Priority: P2 Milestone: CPS 3.4.0
Component: CalZope Version: TRUNK
Severity: minor Keywords:
Cc:

Description

In IAttendeeSource, it is specifically started that getCurrentUserAttendee should retrun none if there is no current attendee. This is useful where there is no attendees > users mapping.

Index: Products/CalZope/browser/eventdisplay.py
===================================================================
--- Products/CalZope/browser/eventdisplay.py    (revision 29050)
+++ Products/CalZope/browser/eventdisplay.py    (working copy)
@@ -56,8 +56,11 @@
         calendar = view.context.getCalendar()
         cal_attendees = [x.getAttendeeId() for x in calendar.getAttendees()]
         event_attendees = event.getAttendeeIds()
+        current_attendee_id = None
+        # Get the current user attendee if there is one
         asrc = view.context.portal_calendar.attendee_source
-        current_attendee_id = asrc.getCurrentUserAttendee().getAttendeeId()
+        if asrc.getCurrentUserAttendee() is not None:
+            current_attendee_id = asrc.getCurrentUserAttendee().getAttendeeId()
         allowed = 0
         for attendee_id in cal_attendees:
             if attendee_id not in event_attendees:

Change History

comment:1 Changed 14 years ago by fguillaume

  • Priority changed from P1 to P2
  • Milestone changed from CPS 3.2.5 to CPS 3.4.0

comment:2 Changed 14 years ago by lregebro

  • Status changed from new to closed
  • Resolution set to fixed

Fixed in [29527].

Note: See TracTickets for help on using tickets.