[CalendarServer-changes] [14188] CalendarServer/branches/users/sagen/trashcan/txdav/common/datastore /sql.py

source_changes at macosforge.org source_changes at macosforge.org
Thu Nov 20 13:27:51 PST 2014


Revision: 14188
          http://trac.calendarserver.org//changeset/14188
Author:   sagen at apple.com
Date:     2014-11-20 13:27:51 -0800 (Thu, 20 Nov 2014)
Log Message:
-----------
remove() now calls toTrash()

Modified Paths:
--------------
    CalendarServer/branches/users/sagen/trashcan/txdav/common/datastore/sql.py

Modified: CalendarServer/branches/users/sagen/trashcan/txdav/common/datastore/sql.py
===================================================================
--- CalendarServer/branches/users/sagen/trashcan/txdav/common/datastore/sql.py	2014-11-20 21:16:24 UTC (rev 14187)
+++ CalendarServer/branches/users/sagen/trashcan/txdav/common/datastore/sql.py	2014-11-20 21:27:51 UTC (rev 14188)
@@ -7337,6 +7337,18 @@
 
     @inlineCallbacks
     def remove(self, options=None):
+        """
+        Just moves the object to the trash
+        """
+        yield self.toTrash()
+
+
+    @inlineCallbacks
+    def reallyRemove(self, options=None):
+        """
+        Remove, bypassing the trash
+        """
+
         yield self._deleteQuery.on(self._txn, NoSuchObjectResourceError,
                                    resourceID=self._resourceID)
         yield self.properties()._removeResource()
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20141120/a16a93d6/attachment-0001.html>


More information about the calendarserver-changes mailing list