diff --git a/shiftregister/app/models.py b/shiftregister/app/models.py index a1381c5..f4315fc 100644 --- a/shiftregister/app/models.py +++ b/shiftregister/app/models.py @@ -82,7 +82,12 @@ class Helper(models.Model): output_field=models.DateTimeField(), ) ) - .filter(helper=self, shift_end__gte=timezone.now(), shift__deleted=False) + .filter( + helper=self, + shift_end__gte=timezone.now(), + shift__deleted=False, + state__in=[ShiftRegistration.REGISTERED, ShiftRegistration.CHECKED_IN], + ) .order_by("shift__start_at") .first() )