[CalendarServer-changes] [13195] CalendarServer/branches/release/CalendarServer-5.2-dev/txdav/caldav /datastore/scheduling/icaldiff.py

source_changes at macosforge.org source_changes at macosforge.org
Tue Apr 8 09:25:37 PDT 2014


Revision: 13195
          http://trac.calendarserver.org//changeset/13195
Author:   cdaboo at apple.com
Date:     2014-04-08 09:25:37 -0700 (Tue, 08 Apr 2014)
Log Message:
-----------
Make sure that attendee change is properly merge with If-Schedule-Tag-Match.

Modified Paths:
--------------
    CalendarServer/branches/release/CalendarServer-5.2-dev/txdav/caldav/datastore/scheduling/icaldiff.py

Modified: CalendarServer/branches/release/CalendarServer-5.2-dev/txdav/caldav/datastore/scheduling/icaldiff.py
===================================================================
--- CalendarServer/branches/release/CalendarServer-5.2-dev/txdav/caldav/datastore/scheduling/icaldiff.py	2014-04-08 16:24:20 UTC (rev 13194)
+++ CalendarServer/branches/release/CalendarServer-5.2-dev/txdav/caldav/datastore/scheduling/icaldiff.py	2014-04-08 16:25:37 UTC (rev 13195)
@@ -342,8 +342,20 @@
 
                 else:
                     # We used to generate a 403 here - but instead we now ignore this error and let the server data
-                    # override the client
-                    self._logDiffError("attendeeMerge: Missing uncancelled component from first calendar: %s" % (key,))
+                    # override the client.
+
+                    # If smart_merge is happening, then derive an instance in the new data as the change in the old
+                    # data is valid and likely due to some other attendee changing their status.
+                    if  self.smart_merge:
+                        newOverride = self.newcalendar.deriveInstance(rid, allowCancelled=True)
+                        if newOverride is None:
+                            self._logDiffError("attendeeMerge: Could not derive instance for uncancelled component: %s" % (key,))
+                        else:
+                            self.newcalendar.addComponent(newOverride)
+                            setnew.add(key)
+                            mapnew[key] = newOverride
+                    else:
+                        self._logDiffError("attendeeMerge: Missing uncancelled component from first calendar: %s" % (key,))
             else:
                 if exdatesnew is not None and rid not in exdatesnew:
                     # We used to generate a 403 here - but instead we now ignore this error and let the server data
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20140408/3f10af8c/attachment.html>


More information about the calendarserver-changes mailing list