If you have Djongo (MongoDB Connector based on pymongo) in your project:
save() prohibited to prevent data loss due to unsaved related object 'Mailbox'
when trying to
mailbox.get_new_mail()
That's because Djongo use Model._id instead of Model.id field. When trying to save mailbox object again, that creates new database record with the same fields as mailbox object.
My fix - import models from djongo app in django_mailbox.models file and adding field
_id = models.ObjectIdField()
in Mailbox model.
If you have Djongo (MongoDB Connector based on pymongo) in your project:
when trying to
That's because Djongo use Model._id instead of Model.id field. When trying to save mailbox object again, that creates new database record with the same fields as mailbox object.
My fix - import models from djongo app in django_mailbox.models file and adding field
in Mailbox model.