diff --git a/shiftregister/app/models.py b/shiftregister/app/models.py index d6a529c..a1381c5 100644 --- a/shiftregister/app/models.py +++ b/shiftregister/app/models.py @@ -120,6 +120,8 @@ class ShiftRegistration(models.Model): ) def can_cancel(self): + if self.state != self.REGISTERED: + return false return self.shift.start_at > ( timezone.now() + global_preferences_registry.manager()["helper__min_cancel_time"]