mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-11-16 08:23:12 +00:00
[Printer] Fix bug in updating job object
This commit is contained in:
parent
5213ade25c
commit
505c5e13e4
1 changed files with 10 additions and 1 deletions
|
@ -128,10 +128,19 @@ def new_job(request):
|
|||
)
|
||||
if job_formset.is_valid():
|
||||
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.user = request.user
|
||||
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.save()
|
||||
return redirect('printer:payment')
|
||||
|
|
Loading…
Reference in a new issue