From 09ea4ee5ca516b7080da6863e9ec1fb1ff65518a Mon Sep 17 00:00:00 2001 From: Yorick van Pelt Date: Mon, 15 Apr 2024 09:56:23 +0200 Subject: [PATCH] support setting 'null' in hardcodes --- magisch_corvee_script.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/magisch_corvee_script.py b/magisch_corvee_script.py index 1b23973..3b82a71 100755 --- a/magisch_corvee_script.py +++ b/magisch_corvee_script.py @@ -102,7 +102,8 @@ def set_capabilities(tasks: dict[str, TaskConfig], people: dict[str, Person]): people[p.lower()].can.add(task) if conf.hardcode is not None: for day, pers in enumerate(conf.hardcode): - people[pers.lower()].does.add((day, task)) + if pers: + people[pers.lower()].does.add((day, task)) def write_tasks(people, tasks, file=sys.stdout): for name, p in people.items():