Manage _timestamp when reading Singleton that has not yet a record

This commit is contained in:
Cédric Krier committed 2011-04-20 14:27:52 +02:00
1 parent 14a33432e6
commit f9e158b74c
1 file changed
+3
+3
View File
@@ -87,6 +87,9 @@ class ModelSingleton(ModelStorage):
return res
def default_get(self, fields_names, with_rec_name=True):
if '_timestamp' in fields_names:
fields_names = list(fields_names)
fields_names.remove('_timestamp')
res = super(ModelSingleton, self).default_get(fields_names,
with_rec_name=with_rec_name)
singleton_id = self.get_singleton_id()