fix, dass keine job_kinddates gespeichert werden, wo kein job_kind existiert.

This commit is contained in:
Tim Gröger 2020-05-27 15:05:19 +02:00
parent efa0257cd0
commit dcc9c5ee14
1 changed files with 2 additions and 1 deletions

View File

@ -63,6 +63,7 @@ class Base:
for jobkinddate in jobkinddates:
datum = date(jobkinddate['daydate']['year'], jobkinddate['daydate']['month'], jobkinddate['daydate']['day'])
if jobkinddate['id'] == -1:
if jobkinddate['job_kind']:
self.setJobKindDates(datum, jobkinddate['job_kind'], jobkinddate['maxpersons'])
if jobkinddate['id'] == 0:
jobkinddate['id'] = jobkinddate['backupid']