[CalendarServer-changes] [10925] CalendarServer/trunk/txdav/caldav/datastore/sql.py
source_changes at macosforge.org
source_changes at macosforge.org
Thu Mar 14 14:29:22 PDT 2013
Revision: 10925
http://trac.calendarserver.org//changeset/10925
Author: dre at apple.com
Date: 2013-03-14 14:29:22 -0700 (Thu, 14 Mar 2013)
Log Message:
-----------
Fix DropBox (attachments) for Oracle, which still treats empty string as NULL
Modified Paths:
--------------
CalendarServer/trunk/txdav/caldav/datastore/sql.py
Modified: CalendarServer/trunk/txdav/caldav/datastore/sql.py
===================================================================
--- CalendarServer/trunk/txdav/caldav/datastore/sql.py 2013-03-14 21:14:13 UTC (rev 10924)
+++ CalendarServer/trunk/txdav/caldav/datastore/sql.py 2013-03-14 21:29:22 UTC (rev 10925)
@@ -1162,7 +1162,7 @@
# Determine attachment mode (ignore inbox's) - NB we have to do this
# after setting up other properties as UID at least is needed
self._attachment = _ATTACHMENTS_MODE_NONE
- if self._dropboxID is None:
+ if not self._dropboxID:
if self._parentCollection.name() != "inbox":
if component.hasPropertyInAnyComponent("X-APPLE-DROPBOX"):
self._attachment = _ATTACHMENTS_MODE_WRITE
@@ -1582,7 +1582,7 @@
for managed_id in added:
changed[managed_id] = newattached[managed_id]
- if self._dropboxID is None:
+ if not self._dropboxID:
self._dropboxID = str(uuid.uuid4())
changes = yield self._addingManagedIDs(self._txn, self._parentCollection, self._dropboxID, changed, component.resourceUID())
@@ -1714,7 +1714,7 @@
raise AttachmentStoreFailed
yield t.loseConnection()
- if self._dropboxID is None:
+ if not self._dropboxID:
self._dropboxID = str(uuid.uuid4())
attachment._objectDropboxID = self._dropboxID
@@ -2119,7 +2119,7 @@
@return: C{True} if this attachment exists, C{False} otherwise.
"""
att = schema.ATTACHMENT
- if self._dropboxID is not None:
+ if self._dropboxID:
where = (att.DROPBOX_ID == self._dropboxID).And(
att.PATH == self._name)
else:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20130314/5a6b8e18/attachment.html>
More information about the calendarserver-changes
mailing list