update fields argument when given #1172
This commit is contained in:
committed by
Erdenezul Batmunkh
parent
d3c3c23630
commit
101947da8b
@@ -1260,7 +1260,11 @@ class CachedReferenceField(BaseField):
|
||||
if value.pk is None:
|
||||
self.error('You can only reference documents once they have'
|
||||
' been saved to the database')
|
||||
return {'_id': value.pk}
|
||||
value_dict = {'_id': value.pk}
|
||||
for field in self.fields:
|
||||
value_dict.update({field: value[field]})
|
||||
|
||||
return value_dict
|
||||
|
||||
raise NotImplementedError
|
||||
|
||||
|
||||
Reference in New Issue
Block a user