8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-12-23 15:33:45 +00:00

[Printer] Minor Fixes

This commit is contained in:
Maxime Bombar 2018-06-29 05:05:15 +02:00
parent 14c1b92c33
commit 4894273214
2 changed files with 5 additions and 5 deletions

View file

@ -21,10 +21,10 @@ from .models import (
)
class JobForm(FormRevMixin, ModelForm):
class JobWithOptionsForm(FormRevMixin, ModelForm):
def __init__(self, *args, **kwargs):
prefix = kwargs.pop('prefix', self.Meta.model.__name__)
super(TrueJobForm, self).__init__(*args, prefix=prefix, **kwargs)
super(JobWithOptionsForm, self).__init__(*args, prefix=prefix, **kwargs)
class Meta:
model = JobWithOptions

View file

@ -18,7 +18,7 @@ from users.models import User
from . import settings
from .forms import (
JobForm,
JobWithOptionsForm,
)
@ -26,8 +26,8 @@ def new_job(request):
"""
View to create a new printing job
"""
job_formset = formset_factory(JobForm)(
request.POST or None, request.FILES,
job_formset = formset_factory(JobWithOptionsForm)(
request.POST or None, request.FILES or None,
)
if job_formset.is_valid():
for job in job_formset: