diff options
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) | 
