diff --git a/shiftregister/app/models.py b/shiftregister/app/models.py index a652d27..68435de 100644 --- a/shiftregister/app/models.py +++ b/shiftregister/app/models.py @@ -58,7 +58,7 @@ class Helper(models.Model): output_field=models.DateTimeField(), ) ) - .filter(helper=self, shift_end__gte=timezone.now()) + .filter(helper=self, shift_end__gte=timezone.now(), shift__deleted=False) .order_by("shift__start_at") .first() ) diff --git a/shiftregister/app/templates/shift.html b/shiftregister/app/templates/shift.html index dc5fba9..596e799 100644 --- a/shiftregister/app/templates/shift.html +++ b/shiftregister/app/templates/shift.html @@ -9,20 +9,23 @@ {% endif %} {% if shift.deleted %}