From 3dae10a792d49d685debfe52eb7d61b9a6dc93f9 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Tue, 10 Sep 2019 20:49:13 +0200 Subject: QA: lock/unlock (sites, operations, context records, finds, containers, warehouses) --- ishtar_common/forms.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'ishtar_common/forms.py') diff --git a/ishtar_common/forms.py b/ishtar_common/forms.py index a69c65f0e..8acd5ffcc 100644 --- a/ishtar_common/forms.py +++ b/ishtar_common/forms.py @@ -698,7 +698,7 @@ def get_form_selection( class_name, label, key, model, base_form, get_url, not_selected_error=_(u"You should select an item."), new=False, new_message=_(u"Add a new item"), get_full_url=None, - gallery=False, map=False): + gallery=False, map=False, base_form_select=None): """ Generate a class selection form class_name -- name of the class @@ -746,7 +746,9 @@ def get_form_selection( return cleaned_data attrs['clean'] = clean attrs['SEARCH_AND_SELECT'] = True - return type(class_name, (forms.Form,), attrs) + if not base_form_select: + base_form_select = forms.Form + return type(class_name, (base_form_select,), attrs) def get_data_from_formset(data): -- cgit v1.2.3