diff options
Diffstat (limited to 'ishtar_common/models.py')
| -rw-r--r-- | ishtar_common/models.py | 8 | 
1 files changed, 6 insertions, 2 deletions
diff --git a/ishtar_common/models.py b/ishtar_common/models.py index 32ae95594..9adba889b 100644 --- a/ishtar_common/models.py +++ b/ishtar_common/models.py @@ -161,9 +161,11 @@ class ValueGetter(object):      def get_values(self, prefix='', no_values=False, filtr=None, **kwargs):          if not prefix:              prefix = self._prefix +        exclude = kwargs.get("exclude", [])          values = {} -        if hasattr(self, "qrcode") and (not filtr -                                        or 'qrcode_path' in filtr): +        if hasattr(self, "qrcode") and ( +                not filtr or prefix + 'qrcode_path' in filtr) and \ +                prefix + 'qrcode_path' not in exclude:              values[prefix + 'qrcode_path'] = self.qrcode_path          for field_name in get_all_field_names(self):              try: @@ -172,6 +174,8 @@ class ValueGetter(object):                  continue              if field_name in self.GET_VALUES_EXCLUDE_FIELDS:                  continue +            if prefix + field_name in exclude: +                continue              if hasattr(value, 'get_values'):                  new_prefix = prefix + field_name + '_'                  values.update(  | 
