diff options
Diffstat (limited to 'archaeological_operations/forms.py')
-rw-r--r-- | archaeological_operations/forms.py | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/archaeological_operations/forms.py b/archaeological_operations/forms.py index dc342f477..95d2d5275 100644 --- a/archaeological_operations/forms.py +++ b/archaeological_operations/forms.py @@ -337,21 +337,6 @@ PeriodFormset = formset_factory(PeriodForm, can_delete=True, formset=PeriodFormSet) PeriodFormset.form_label = _("Periods") -def has_associated_file(form_name, file_key='associated_file', negate=False): - def func(self, request, storage): - if storage.prefix not in request.session or \ - 'step_data' not in request.session[storage.prefix] or \ - form_name not in request.session[storage.prefix]['step_data'] or\ - form_name + '-' + file_key not in \ - request.session[storage.prefix]['step_data'][form_name]: - return negate - try: - file_id = int(request.session[storage.prefix]['step_data']\ - [form_name][form_name+'-'+file_key]) - return not negate - except ValueError: - return negate - return func class FinalOperationClosingForm(FinalForm): confirm_msg = " " confirm_end_msg = _(u"Would you like to close this operation?") |