Skip to content

Commit

Permalink
feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
SKairinos committed Dec 18, 2023
1 parent 5eac7fd commit 0c94710
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions codeforlife/user/views/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ def get_queryset(self):
if not isinstance(user, User):
return User.objects.none()

if user.student:
if user.student is not None:
return User.objects.filter(student__klass_id=user.student.klass_id)

if user.teacher:
if user.teacher is not None:
teachers = User.objects.none()
students = User.objects.none()

if user.teacher.school_id:
if user.teacher.school_id is not None:
teachers = User.objects.filter(
teacher__school_id=user.teacher.school_id
)
Expand Down

0 comments on commit 0c94710

Please sign in to comment.