Fix team dashboard again
This commit is contained in:
parent
d18b2d6d3d
commit
bbbc2733b4
|
@ -37,16 +37,14 @@ class Shift(models.Model):
|
|||
def with_reg_count():
|
||||
return Shift.objects.annotate(
|
||||
reg_count=Count(
|
||||
Case(
|
||||
When(
|
||||
shiftregistration__state__in=[
|
||||
"shiftregistration",
|
||||
distinct=True,
|
||||
filter=Q(
|
||||
shiftregistration__state__in=(
|
||||
ShiftRegistration.RegState.REGISTERED,
|
||||
ShiftRegistration.RegState.CHECKED_IN,
|
||||
],
|
||||
then=1,
|
||||
),
|
||||
output_field=models.IntegerField(),
|
||||
)
|
||||
),
|
||||
)
|
||||
)
|
||||
|
||||
|
|
|
@ -70,7 +70,7 @@ def team_dashboard(request):
|
|||
When(required_helpers=0, then=F("room__required_helpers")),
|
||||
default=F("required_helpers"),
|
||||
),
|
||||
fallbackassignment_count=Count("fallbackassignment"),
|
||||
fallbackassignment_count=Count("fallbackassignment", distinct=True),
|
||||
)
|
||||
.filter(
|
||||
deleted=False,
|
||||
|
|
Loading…
Reference in New Issue