mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-11-16 08:23:12 +00:00
[Printer] Prevent crashing when no file is given
This commit is contained in:
parent
3a3f2e0797
commit
62aef50c08
1 changed files with 8 additions and 7 deletions
|
@ -46,15 +46,16 @@ def new_job(request):
|
|||
View to create a new printing job
|
||||
"""
|
||||
if request.method == 'POST':
|
||||
if request.FILES:
|
||||
job_formset = formset_factory(JobWithOptionsForm)(
|
||||
request.POST,
|
||||
request.FILES,
|
||||
request.FILES or None,
|
||||
form_kwargs={'user': request.user},
|
||||
)
|
||||
|
||||
tmp_job_formset = job_formset
|
||||
|
||||
if request.FILES:
|
||||
|
||||
if job_formset.is_valid():
|
||||
files = request.FILES
|
||||
data = []
|
||||
|
|
Loading…
Reference in a new issue