[CalendarServer-changes] [10820] CalendarServer/branches/users/gaya/sharedgroups/txdav/common/ datastore/sql.py
source_changes at macosforge.org
source_changes at macosforge.org
Wed Feb 27 21:26:27 PST 2013
Revision: 10820
http://trac.calendarserver.org//changeset/10820
Author: gaya at apple.com
Date: 2013-02-27 21:26:27 -0800 (Wed, 27 Feb 2013)
Log Message:
-----------
fix attempt to revert CommonHomeChild.create() to trunk
Modified Paths:
--------------
CalendarServer/branches/users/gaya/sharedgroups/txdav/common/datastore/sql.py
Modified: CalendarServer/branches/users/gaya/sharedgroups/txdav/common/datastore/sql.py
===================================================================
--- CalendarServer/branches/users/gaya/sharedgroups/txdav/common/datastore/sql.py 2013-02-28 05:15:10 UTC (rev 10819)
+++ CalendarServer/branches/users/gaya/sharedgroups/txdav/common/datastore/sql.py 2013-02-28 05:26:27 UTC (rev 10820)
@@ -3137,12 +3137,10 @@
@classmethod
@inlineCallbacks
def create(cls, home, name):
- child = (yield cls.objectWithName(home, name))
- if child is not None:
+
+ if (yield cls._bindForNameAndHomeID.on(home._txn,
+ name=name, homeID=home._resourceID)):
raise HomeChildNameAlreadyExistsError(name)
- invite = (yield cls.invitedObjectWithName(home, name))
- if invite is not None:
- raise HomeChildNameAlreadyExistsError(name)
if name.startswith("."):
raise HomeChildNameNotAllowedError(name)
@@ -3155,7 +3153,6 @@
_created, _modified = (
yield cls._insertHomeChildMetaData.on(home._txn,
resourceID=resourceID))[0]
-
# Bind table needs entry
yield cls._bindInsertQuery.on(
home._txn, homeID=home._resourceID, resourceID=resourceID,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20130227/47eb3d87/attachment.html>
More information about the calendarserver-changes
mailing list