Skip to content

Commit

Permalink
typo
Browse files Browse the repository at this point in the history
  • Loading branch information
pcrespov committed Dec 8, 2022
1 parent 81fbd9f commit 00ad66a
Showing 1 changed file with 7 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,14 +79,13 @@ async def check_other_registrations(
db: AsyncpgStorage,
cfg: LoginOptions,
) -> None:
user = await db.get_user({"email": email})
if not user:
# The email is already taken

# RULE: drop_previous_registration
# An unconfirmed account w/o confirmation or w/ an expired confirmation
# will get deleted and the email can be overtaken by
# this new registration

if user := await db.get_user({"email": email}):
# An account already registered with this email
#
# RULE 'drop_previous_registration': any unconfirmed account w/o confirmation or
# w/ an expired confirmation will get deleted and its account (i.e. email)
# can be overtaken by this new registration
#
if user["status"] == CONFIRMATION_PENDING:
_confirmation = await db.get_confirmation(
Expand Down

0 comments on commit 00ad66a

Please sign in to comment.