diff --git a/geruecht/controller/mainController/mainJobKindController.py b/geruecht/controller/mainController/mainJobKindController.py index cc23f6c..3eb67f0 100644 --- a/geruecht/controller/mainController/mainJobKindController.py +++ b/geruecht/controller/mainController/mainJobKindController.py @@ -63,7 +63,8 @@ class Base: for jobkinddate in jobkinddates: datum = date(jobkinddate['daydate']['year'], jobkinddate['daydate']['month'], jobkinddate['daydate']['day']) if jobkinddate['id'] == -1: - self.setJobKindDates(datum, jobkinddate['job_kind'], jobkinddate['maxpersons']) + if jobkinddate['job_kind']: + self.setJobKindDates(datum, jobkinddate['job_kind'], jobkinddate['maxpersons']) if jobkinddate['id'] == 0: jobkinddate['id'] = jobkinddate['backupid'] db.deleteAllWorkerWithJobKind(datetime.combine(datum, time(12)), jobkinddate['job_kind'])