mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 08:46:37 -04:00
add attr to tell if fact was pulled from db
This commit is contained in:
parent
309789fcbd
commit
7111b3b924
1 changed files with 4 additions and 0 deletions
|
@ -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]
|
||||
|
|
Loading…
Reference in a new issue