From b066246a5ce456b89f63bdb2fc9628b81126c4ec Mon Sep 17 00:00:00 2001 From: ketralnis Date: Mon, 10 Aug 2009 10:13:43 -0700 Subject: [PATCH] When _commit()ing inside of a lock, only sync data properties if they are available --- r2/r2/lib/db/thing.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/r2/r2/lib/db/thing.py b/r2/r2/lib/db/thing.py index 1d2679fa1..7a09aa1a0 100644 --- a/r2/r2/lib/db/thing.py +++ b/r2/r2/lib/db/thing.py @@ -147,7 +147,9 @@ class DataThing(object): #copy in the cache's version for prop in self._base_props: self.__setattr__(prop, getattr(other_self, prop), False) - self._t = other_self._t + + if other_self._loaded: + self._t = other_self._t #re-apply the .dirties old_dirties = self._dirties