diff options
-rw-r--r-- | ishtar_common/models.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ishtar_common/models.py b/ishtar_common/models.py index 88ad3009a..201cf7c21 100644 --- a/ishtar_common/models.py +++ b/ishtar_common/models.py @@ -133,13 +133,16 @@ class ValueGetter(object): _prefix = "" GET_VALUES_EXTRA = [] COL_LABELS = {} + GET_VALUE_EXCLUDE_FIELDS = ['search_vector', 'id'] def get_values(self, prefix=''): if not prefix: prefix = self._prefix values = {} for field_name in get_all_field_names(self): - if not hasattr(self, field_name): + if not hasattr(self, field_name) or \ + field_name in self.GET_VALUE_EXCLUDE_FIELDS or \ + field_name.endswith('_id'): continue value = getattr(self, field_name) if hasattr(value, 'get_values'): |