Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Mathias-a committed Oct 10, 2023
1 parent 14c60d0 commit 57c09da
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion backend/samfundet/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,9 @@ def get_queryset(self) -> QuerySet[User]:

# Exclude users who have any admissions for the given recruitment that have an interview_time
users_without_interviews = User.objects.filter(admissions__recruitment=recruitment).annotate(
num_interviews=Count(Case(When(admissions__recruitment=recruitment, then='admissions__interview_time'), default=None, output_field=None))
num_interviews=Count(
Case(When(admissions__recruitment=recruitment, then='admissions__interview__interview_time'), default=None, output_field=None)
)
).filter(num_interviews=0)
return users_without_interviews

Expand Down

0 comments on commit 57c09da

Please sign in to comment.