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
commit8f18e7aa3ef8750faaf8c4cd136827555fdf66e4 (patch)
tree45f1d910b67a30e44015735581ec9cdc6db51cdf /ishtar_common/forms.py
parent3d630a998043a9a6a9d61d42f3394b121f045431 (diff)
downloadIshtar-8f18e7aa3ef8750faaf8c4cd136827555fdf66e4.tar.bz2
Ishtar-8f18e7aa3ef8750faaf8c4cd136827555fdf66e4.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):