support setting 'null' in hardcodes

This commit is contained in:
Yorick van Pelt 2024-04-15 09:56:23 +02:00
parent 9fd67ff514
commit 09ea4ee5ca
No known key found for this signature in database
GPG Key ID: D8D3CC6D951384DE

View File

@ -102,7 +102,8 @@ def set_capabilities(tasks: dict[str, TaskConfig], people: dict[str, Person]):
people[p.lower()].can.add(task) people[p.lower()].can.add(task)
if conf.hardcode is not None: if conf.hardcode is not None:
for day, pers in enumerate(conf.hardcode): 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): def write_tasks(people, tasks, file=sys.stdout):
for name, p in people.items(): for name, p in people.items():