diff options
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 |
commit | eb93298d18f289544495e99e6d67cb803ef78f92 (patch) | |
tree | aa1ca9d23efe215e5e340316141f5919ca7c84fe /ishtar_common/forms.py | |
parent | 118afa78428fb2a7ad0df2c2b861c9d934443cfb (diff) | |
download | Ishtar-eb93298d18f289544495e99e6d67cb803ef78f92.tar.bz2 Ishtar-eb93298d18f289544495e99e6d67cb803ef78f92.zip |
Find search: add basket criteria
Diffstat (limited to 'ishtar_common/forms.py')
-rw-r--r-- | ishtar_common/forms.py | 7 |
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) |