From eb56b658fa6ee68e4e278cd9fc08b82959dff43e Mon Sep 17 00:00:00 2001 From: "Andreas (@xAndy) Zimmermann" Date: Tue, 17 May 2022 16:30:29 +0200 Subject: [PATCH] fix can_cancel for shiftregs --- shiftregister/app/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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()