From 8ed36ae5f5ca4ef205f3210fd4a1331a95c5fbe5 Mon Sep 17 00:00:00 2001
From: Hangzhi Yu <hangzhi@protonmail.com>
Date: Wed, 1 May 2024 21:11:56 +0200
Subject: [PATCH] Use default value for cancelled value

---
 aleksis/apps/chronos/schema/__init__.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/aleksis/apps/chronos/schema/__init__.py b/aleksis/apps/chronos/schema/__init__.py
index d0172159..485481bf 100644
--- a/aleksis/apps/chronos/schema/__init__.py
+++ b/aleksis/apps/chronos/schema/__init__.py
@@ -195,7 +195,7 @@ class SubstitutionBatchCreateOrUpdateMutation(graphene.Mutation):
                     amends=amended_lesson_event,
                     subject=substitution.subject,
                     comment=substitution.comment or "",
-                    cancelled=substitution.cancelled,
+                    cancelled=substitution.cancelled or False,
                 )
                 if substitution.teachers is not None:
                     obj.teachers.set(Person.objects.filter(pk__in=substitution.teachers))
-- 
GitLab