[CalendarServer-changes] [9281] CalendarServer/branches/users/glyph/uuid-normalize/twistedcaldav/ directory/calendaruserproxy.py
source_changes at macosforge.org
source_changes at macosforge.org
Thu May 24 13:33:55 PDT 2012
Revision: 9281
http://trac.macosforge.org/projects/calendarserver/changeset/9281
Author: glyph at apple.com
Date: 2012-05-24 13:33:55 -0700 (Thu, 24 May 2012)
Log Message:
-----------
fix up group name upgrader to be compatible with tests
Modified Paths:
--------------
CalendarServer/branches/users/glyph/uuid-normalize/twistedcaldav/directory/calendaruserproxy.py
Modified: CalendarServer/branches/users/glyph/uuid-normalize/twistedcaldav/directory/calendaruserproxy.py
===================================================================
--- CalendarServer/branches/users/glyph/uuid-normalize/twistedcaldav/directory/calendaruserproxy.py 2012-05-24 20:33:52 UTC (rev 9280)
+++ CalendarServer/branches/users/glyph/uuid-normalize/twistedcaldav/directory/calendaruserproxy.py 2012-05-24 20:33:55 UTC (rev 9281)
@@ -800,15 +800,15 @@
)
if int(old_version) < 5:
- for groupname, member in (
- (yield self.query("select GROUPNAME, MEMBER from GROUPS"))
+ for (groupname, member) in (
+ (yield self._db_all_values_for_sql("select GROUPNAME, MEMBER from GROUPS"))
):
- groupPrincipalUID, groupMode = groupname.split("#")
+ grouplist = groupname.split("#")
+ grouplist[0] = normalizeUUID(grouplist[0])
yield self._db_execute("""
- update GROUPS set (GROUPNAME = :1, MEMBER = :2)
+ update GROUPS set GROUPNAME = :1, MEMBER = :2
where GROUPNAME = :1 and MEMBER = :2
- """, "#".join([normalizeUUID(groupPrincipalUID), groupMode]),
- normalizeUUID(member))
+ """, ["#".join(grouplist), normalizeUUID(member)])
def _db_empty_data_tables(self):
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20120524/5e302e15/attachment-0001.html>
More information about the calendarserver-changes
mailing list