Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛(mailboxes) fix logic when attempting to duplicate mailboxes #534

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mjeammet
Copy link
Member

Purpose

Logic was broken when attempting to duplicate mailboxes, where infos were sent to dimail before checking for uniqueness.

Proposal

I'd rather add this logic to a validate function in serializer, but that would require some heavier refacto (addition of domain in serializer or at least in context)

Logic was broken when attempting to duplicate mailboxes,
where infos were sent to dimail before checking for uniqueness.
client = APIClient()
client.force_login(access.user)
mailbox_values = dict(serializers.MailboxSerializer(existing_mailbox).data)
# import pdb; pdb.set_trace()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Part of me is curious to know the story behind this line (and the one like it below). And part of me is afraid to hear it 😜

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just wanted to make sure all info were the same but only the local_part field should matter. I'll simplify it right away

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants