Skip to content

Commit

Permalink
fix: comment out check
Browse files Browse the repository at this point in the history
  • Loading branch information
SKairinos committed Nov 7, 2024
1 parent 6226609 commit 691d372
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions codeforlife/models/abstract_base_user.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Created on 06/11/2024 at 16:38:15(+00:00).
"""

import sys
# import sys
import typing as t
from functools import cached_property

Expand Down Expand Up @@ -53,13 +53,14 @@ def _session_class(self):
@property
def is_authenticated(self):
"""A flag designating if this contributor has authenticated."""
# TODO: delete if not needed.
# Avoid initial migration error where session table is not created yet
if (
sys.argv
and "manage.py" in sys.argv[0]
and "runserver" not in sys.argv
):
return True
# if (
# sys.argv
# and "manage.py" in sys.argv[0]
# and "runserver" not in sys.argv
# ):
# return True

try:
return self.is_active and not self.session.is_expired
Expand Down

0 comments on commit 691d372

Please sign in to comment.