umutbozkurt/django-rest-framework-mongoengine

properly save nillable EmbeddedDocumentListField

MiltosD opened this issue · 0 comments

Is there a way to make a EmbeddedDocumentListField nillable, in order to avoid creating empty lists in MongoDB? Currently, I use

some_field = EmbeddedDocumentListField(EmbeddedDoc, null=True)

When I try to set some_field: null, i get

'NoneType' object is not iterable
at rest_framework_mongoengine\serializers.py in recursive_save, line 238

Any help is very much appreciated