mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-12-25 00:13:45 +00:00
[Printer] Minor Fixes
This commit is contained in:
parent
ef1375067a
commit
1d711b6be6
2 changed files with 5 additions and 5 deletions
|
@ -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
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue