Simplify logic

This commit is contained in:
cuom1999 2023-01-27 17:51:38 -06:00
parent 64a5c73c21
commit bd05ba6b78
2 changed files with 3 additions and 14 deletions

View file

@ -371,7 +371,7 @@ class Problem(models.Model):
@classmethod
def get_visible_problems(cls, user):
# Do unauthenticated check here so we can skip authentication checks later on.
if not user.is_authenticated:
if not user.is_authenticated or not user:
return cls.get_public_problems()
# Conditions for visible problem: