From 7bd7acc6bf5f12f8015eeb3e48b88a9743e8b4e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20Gr=C3=B6ger?= Date: Sun, 24 May 2020 22:12:46 +0200 Subject: [PATCH] =?UTF-8?q?routes=20f=C3=BCr=20user=20erweitert,=20sodass?= =?UTF-8?q?=20sich=20der=20user=20in=20einen=20bestimmten=20dienst=20einsc?= =?UTF-8?q?hreiben=20kann.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- geruecht/user/routes.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/geruecht/user/routes.py b/geruecht/user/routes.py index 0396106..6ebd0b6 100644 --- a/geruecht/user/routes.py +++ b/geruecht/user/routes.py @@ -167,7 +167,11 @@ def _addUser(**kwargs): month = data['month'] year = data['year'] date = datetime(year, month, day, 12) - retVal = mainController.addWorker(user.uid, date, userExc=True) + job_kind = None + if 'job_kind' in data: + job_kind = data['job_kind'] + mainController.addWorker(user.uid, date, job_kind=job_kind, userExc=True) + retVal = mainController.getWorker(date) debug.debug("return {{ {} }}".format(retVal)) jobL.info("Mitglied {} {} schreib sich am {} zum Dienst ein.".format( user.firstname, user.lastname, date.date()))