diff --git a/CHANGELOG.md b/CHANGELOG.md index 02b55cc..2b76aaf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,10 @@ and this project adheres to ## [Unreleased] +### Fixed + +- 🐛(mailbox) fix migration to fill dn_email field + ## [1.13.0] - 2025-03-04 ### Added diff --git a/src/backend/mailbox_manager/migrations/0023_mailbox_email_mailbox_last_login_mailbox_password.py b/src/backend/mailbox_manager/migrations/0023_mailbox_email_mailbox_last_login_mailbox_password.py index 8c0faf7..b2f7314 100644 --- a/src/backend/mailbox_manager/migrations/0023_mailbox_email_mailbox_last_login_mailbox_password.py +++ b/src/backend/mailbox_manager/migrations/0023_mailbox_email_mailbox_last_login_mailbox_password.py @@ -12,7 +12,7 @@ def fill_dn_email(apps, schema_editor): models.Q(dn_email="") | models.Q(dn_email__isnull=True) ): # quite naive but we don't have many data - mailbox.dn_email = mailbox.get_email() + mailbox.dn_email = f"{mailbox.local_part}@{mailbox.domain.name}" mailbox.save()