Open BolajiOlajide opened 1 month ago
Okay, this one is quite tricky for a couple of reasons. The bug is caused by a valid database constraint.
The organisation_invites_invitee_email
constraint ensures we have invite per user for any given organization, however, this constraint doesn't take into consideration the status of the invite whether it has been accepted
or otherwise.
My recommendation is to have this constraint removed, then have the check done in code where we just check if there's a record for organisation_members
for that user that isn't deleted.
cc @jirevwe
Hmm, alright.
Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
if the invite and org member are both deleted and the user isn't deleted I should able to reinvite the user to the same org again
Screenshots
If applicable, could you add screenshots to help explain your problem?
Stack (please complete the following information):
Additional context
Please feel free to add any other context about the problem here.