Skip to content

Commit

Permalink
Update condition check to make more Pythonic
Browse files Browse the repository at this point in the history
Signed-off-by: Nishant Nayak <[email protected]>
  • Loading branch information
nishant-nayak committed Jan 8, 2024
1 parent 2cf16e9 commit b9d4689
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions corpus/accounts/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ def signin(request):
elif re.search(r"^[0-9]{6,}$", username) is not None:
exec_member = ExecutiveMember.objects.filter(reg_number=username)
else:
exec_member = []
exec_member = None

if len(exec_member) == 1:
if exec_member is not None:
user = authenticate(
username=exec_member[0].user.email, password=password
)
Expand Down

0 comments on commit b9d4689

Please sign in to comment.