set user default mailbox in convert_user_full_mailbox

This commit is contained in:
Son NK 2020-02-23 15:41:08 +07:00
parent 9669c04414
commit 2eae0ba4fd
2 changed files with 3 additions and 0 deletions

View file

@ -162,6 +162,8 @@ def fake_data():
m3 = Mailbox.create(user_id=user.id, email="m3@cd.ef", verified=True)
db.session.commit()
user.default_mailbox_id = m1.id
GenEmail.create_new(user.id, "e1@", mailbox_id=m1.id)
GenEmail.create_new(user.id, "e2@", mailbox_id=m3.id)

View file

@ -54,6 +54,7 @@ def convert_user_full_mailbox(user):
# finally set user to full_mailbox
user.full_mailbox = True
user.default_mailbox_id = default_mb.id
db.session.commit()