From 5c4fb8529ddd8a94932f1ac6828ef973f274302a Mon Sep 17 00:00:00 2001 From: Guillaume Ayoub Date: Fri, 26 Apr 2013 13:29:24 +0200 Subject: [PATCH] Fix modification time for not-created-yet collections --- radicale/storage/database.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/radicale/storage/database.py b/radicale/storage/database.py index fc3dca5..a780647 100644 --- a/radicale/storage/database.py +++ b/radicale/storage/database.py @@ -118,7 +118,8 @@ class Collection(ical.Collection): def _modification_time(self): return ( self.session.query(func.max(DBLine.timestamp)) - .join(DBItem).filter_by(collection_path=self.path).first())[0] + .join(DBItem).filter_by(collection_path=self.path).first()[0] + or datetime.now()) @property def _db_collection(self):