Skip to content

Seems a bug: views.SendJSONInvite.post creates invite without deleting a previous invalidate one  #243

@Huge

Description

@Huge

/invitations/views.py, line 72 fails with django.db.utils.IntegrityError: UNIQUE constraint failed: invitations_invitation.email when a user was invited previously but their invitation expired.

There seem two ways to fix it - either improve the Invitation class create method to remove the invalid invitation first or fix the logic of the CleanEmailMixin().validate_invitation(invitee).

I want to fix it, so probably I would provide a PR...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions