fix, dass keine job_kinddates gespeichert werden, wo kein job_kind existiert.
This commit is contained in:
parent
efa0257cd0
commit
dcc9c5ee14
|
@ -63,7 +63,8 @@ class Base:
|
||||||
for jobkinddate in jobkinddates:
|
for jobkinddate in jobkinddates:
|
||||||
datum = date(jobkinddate['daydate']['year'], jobkinddate['daydate']['month'], jobkinddate['daydate']['day'])
|
datum = date(jobkinddate['daydate']['year'], jobkinddate['daydate']['month'], jobkinddate['daydate']['day'])
|
||||||
if jobkinddate['id'] == -1:
|
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:
|
if jobkinddate['id'] == 0:
|
||||||
jobkinddate['id'] = jobkinddate['backupid']
|
jobkinddate['id'] = jobkinddate['backupid']
|
||||||
db.deleteAllWorkerWithJobKind(datetime.combine(datum, time(12)), jobkinddate['job_kind'])
|
db.deleteAllWorkerWithJobKind(datetime.combine(datum, time(12)), jobkinddate['job_kind'])
|
||||||
|
|
Loading…
Reference in New Issue