summaryrefslogtreecommitdiff
path: root/ishtar_common/forms.py
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2019-09-10 20:49:13 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2019-09-10 20:49:13 +0200
commit3dae10a792d49d685debfe52eb7d61b9a6dc93f9 (patch)
tree45f1d910b67a30e44015735581ec9cdc6db51cdf /ishtar_common/forms.py
parent58178a04b3e716a063b1c457018aafe28e5107dd (diff)
downloadIshtar-3dae10a792d49d685debfe52eb7d61b9a6dc93f9.tar.bz2
Ishtar-3dae10a792d49d685debfe52eb7d61b9a6dc93f9.zip
QA: lock/unlock (sites, operations, context records, finds, containers, warehouses)
Diffstat (limited to 'ishtar_common/forms.py')
-rw-r--r--ishtar_common/forms.py6
1 files changed, 4 insertions, 2 deletions
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):