diff --git a/shiftregister/app/models.py b/shiftregister/app/models.py index d1c9c3a..cfb3650 100644 --- a/shiftregister/app/models.py +++ b/shiftregister/app/models.py @@ -127,7 +127,7 @@ class ShiftRegistration(models.Model): ) def can_cancel(self): - if self.state != self.REGISTERED: + if self.state != self.RegState.REGISTERED: return false return self.shift.start_at > ( timezone.now()