From 307e1a0de31963584d1916ca1f8c7eb0e50ebe6a Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Wed, 26 Jun 2024 11:04:17 +0200 Subject: 🐛 templates: add missing m2m values MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ishtar_common/models.py | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) (limited to 'ishtar_common') diff --git a/ishtar_common/models.py b/ishtar_common/models.py index 231d073e3..def056425 100644 --- a/ishtar_common/models.py +++ b/ishtar_common/models.py @@ -269,16 +269,7 @@ class ValueGetter: "point", "history_m2m", ] - GET_VALUES_ = [ - "preservation_to_considers", - "alterations", - "alteration_causes", - ] - GET_VALUES_EXTRA_TYPES = [ - "preservation_to_considers", - "alterations", - "alteration_causes", - ] + GET_VALUES_M2M = [] def _get_values_documents(self, prefix="", filtr=None): values = {} @@ -365,7 +356,7 @@ class ValueGetter: for key, val in values.items(): if val is None: val = "" - elif (key in self.GET_VALUES_EXTRA_TYPES or "type" in key) and ( + elif (key in self.GET_VALUES_M2M or "type" in key) and ( val.__class__.__name__.split(".")[0] == "ManyRelatedManager" ): val = " ; ".join(str(v) for v in val.all()) -- cgit v1.2.3