8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-11-09 19:36:27 +00:00

[Printer] Fix bug in updating job object

This commit is contained in:
Maxime Bombar 2018-10-22 01:15:29 +02:00 committed by root
parent 5213ade25c
commit 505c5e13e4

View file

@ -128,10 +128,19 @@ def new_job(request):
) )
if job_formset.is_valid(): if job_formset.is_valid():
for job_form in job_formset: for job_form in job_formset:
jid = job_form.cleaned_data['jid'] data = job_form.cleaned_data
jid = data['jid']
job = JobWithOptions.objects.get(id=jid) job = JobWithOptions.objects.get(id=jid)
job.user = request.user job.user = request.user
job.status = 'Printable' job.status = 'Printable'
if data['printAs']:
job.printAs = data['printAs']
job.format = data['format']
job.color = data['color']
job.disposition = data['disposition']
job.count = data['count']
job.stapling = data['stapling']
job.perforation = data['perforation']
job._update_price() job._update_price()
job.save() job.save()
return redirect('printer:payment') return redirect('printer:payment')