add attr to tell if fact was pulled from db

This commit is contained in:
Damien Elmes 2010-02-22 18:00:23 +09:00
parent 309789fcbd
commit 7111b3b924

View file

@ -70,6 +70,10 @@ class Fact(object):
if model:
for fm in model.fieldModels:
self.fields.append(Field(fm))
self.new = True
def isNew(self):
return getattr(self, 'new', False)
def keys(self):
return [field.name for field in self.fields]