You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.
The text was updated successfully, but these errors were encountered: