[CalendarServer-changes] [7150] CalendarServer/branches/users/glyph/oracle/txdav/common/datastore/ sql.py

source_changes at macosforge.org source_changes at macosforge.org
Mon Mar 7 19:07:08 PST 2011


Revision: 7150
          http://trac.macosforge.org/projects/calendarserver/changeset/7150
Author:   glyph at apple.com
Date:     2011-03-07 19:07:08 -0800 (Mon, 07 Mar 2011)
Log Message:
-----------
Don't use ill-fated 'default' thing, just explicitly name the sequence.

Modified Paths:
--------------
    CalendarServer/branches/users/glyph/oracle/txdav/common/datastore/sql.py

Modified: CalendarServer/branches/users/glyph/oracle/txdav/common/datastore/sql.py
===================================================================
--- CalendarServer/branches/users/glyph/oracle/txdav/common/datastore/sql.py	2011-03-08 03:06:56 UTC (rev 7149)
+++ CalendarServer/branches/users/glyph/oracle/txdav/common/datastore/sql.py	2011-03-08 03:07:08 UTC (rev 7150)
@@ -67,7 +67,6 @@
 from twext.enterprise.dal.syntax import SavepointAction
 from twext.enterprise.dal.syntax import Select
 from twext.enterprise.dal.syntax import Update
-from twext.enterprise.dal.syntax import default
 
 from txdav.base.propertystore.base import PropertyName
 from txdav.base.propertystore.none import PropertyStore as NonePropertyStore
@@ -484,7 +483,7 @@
                     {cls._homeMetaDataSchema.RESOURCE_ID: resourceid}).on(txn)
             except Exception: # FIXME: Really want to trap the pg.DatabaseError but in a non-DB specific manner
                 yield savepoint.rollback(txn)
-                
+
                 # Retry the query - row may exist now, if not re-raise
                 homeObject = cls(txn, uid, notifiers)
                 homeObject = (yield homeObject.initFromStore())
@@ -1499,7 +1498,7 @@
         DAL statement to create a home child with all default values.
         """
         child = cls._homeChildSchema
-        return Insert({child.RESOURCE_ID: default},
+        return Insert({child.RESOURCE_ID: schema.RESOURCE_ID_SEQ},
                       Return=(child.RESOURCE_ID, child.CREATED, child.MODIFIED))
 
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20110307/5edc064b/attachment.html>


More information about the calendarserver-changes mailing list