From 752b0ffc4c09e6010e0110362e52437e4d7f1d63 Mon Sep 17 00:00:00 2001 From: Maxime Bombar Date: Sat, 8 Sep 2018 23:04:14 +0200 Subject: [PATCH] [Printer] Populate printAs with request.user if None --- printer/views.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/printer/views.py b/printer/views.py index 0a45d9af..2b63ced3 100644 --- a/printer/views.py +++ b/printer/views.py @@ -52,6 +52,8 @@ def new_job(request): job = job.save(commit=False) job.filename = filename job.user=request.user + if job.printAs is None: + job.printAs = request.user job.status='Printable' # raise # raise ValidationError("'%(path)s'", code='path', params = {'path': request.FILES['form-%s-file' % i].temporary_file_path()})