added test for abstract document without pk creation and adapted behaviour

This commit is contained in:
mrigal
2015-04-16 14:33:16 +02:00
committed by Matthieu Rigal
parent 8909d1d144
commit 1862bcf867
3 changed files with 14 additions and 1 deletions

View File

@@ -152,6 +152,8 @@ class Document(BaseDocument):
"""
def fget(self):
if not 'id_field' in self._meta:
return None
return getattr(self, self._meta['id_field'])
def fset(self, value):