summaryrefslogtreecommitdiff
path: root/ishtar_common/forms.py
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2018-10-03 21:35:15 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2018-10-03 21:35:15 +0200
commitcabf00c1514b8526b5d926faafb52d9d6e936610 (patch)
treeaa1ca9d23efe215e5e340316141f5919ca7c84fe /ishtar_common/forms.py
parentc11ef88d8b945a5bfd039eeba8d2fc738c14fb24 (diff)
downloadIshtar-cabf00c1514b8526b5d926faafb52d9d6e936610.tar.bz2
Ishtar-cabf00c1514b8526b5d926faafb52d9d6e936610.zip
Find search: add basket criteria
Diffstat (limited to 'ishtar_common/forms.py')
-rw-r--r--ishtar_common/forms.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/ishtar_common/forms.py b/ishtar_common/forms.py
index eec66e1a6..3dfcad09e 100644
--- a/ishtar_common/forms.py
+++ b/ishtar_common/forms.py
@@ -127,14 +127,15 @@ class CustomForm(object):
need_user_for_initialization = True
def __init__(self, *args, **kwargs):
- current_user = None
+ self.current_user = None
if 'user' in kwargs:
try:
- current_user = kwargs.pop('user').ishtaruser
+ self.current_user = kwargs.pop('user').ishtaruser
except AttributeError:
pass
super(CustomForm, self).__init__(*args, **kwargs)
- available, excluded, json_fields = self.check_custom_form(current_user)
+ available, excluded, json_fields = self.check_custom_form(
+ self.current_user)
for exc in excluded:
if hasattr(self, 'fields'):
self.remove_field(exc)