diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2022-10-03 13:46:12 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2022-10-03 13:46:12 +0200 |
commit | 6e0edd25093296d3f3c2c7ff5291e8e5174fa595 (patch) | |
tree | fe05738ee40da7e2c072ca66e213500630e93a51 | |
parent | c8dbb8c20a56b5e43e7223afe041e993929a949f (diff) | |
download | Ishtar-6e0edd25093296d3f3c2c7ff5291e8e5174fa595.tar.bz2 Ishtar-6e0edd25093296d3f3c2c7ff5291e8e5174fa595.zip |
Fix delete wizard with no "class_verbose_name"
-rw-r--r-- | CHANGES.md | 9 | ||||
-rw-r--r-- | archaeological_finds/models_treatments.py | 4 | ||||
-rw-r--r-- | ishtar_common/version.py | 4 | ||||
-rw-r--r-- | ishtar_common/wizards.py | 2 |
4 files changed, 15 insertions, 4 deletions
diff --git a/CHANGES.md b/CHANGES.md index d32f8db3a..80fa2f555 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,11 +1,18 @@ --- title: Ishtar changelog -date: 2022-09-18 +date: 2022-10-03 --- Ishtar changelog ================ +v3.2.7 - 2022-10-03 +------------------- + +### Bug fix ### +- Fix delete wizard with no "class_verbose_name" + + v3.2.6 - 2022-09-28 ------------------- diff --git a/archaeological_finds/models_treatments.py b/archaeological_finds/models_treatments.py index 28e6618d6..5d4597b19 100644 --- a/archaeological_finds/models_treatments.py +++ b/archaeological_finds/models_treatments.py @@ -1182,6 +1182,10 @@ class TreatmentFile( return _("Treatment request") @classmethod + def class_verbose_name(cls): # TODO: should be unecessary if MainItem + return cls._meta.verbose_name + + @classmethod def get_query_owns(cls, ishtaruser): return ( Q(history_creator=ishtaruser.user_ptr) | Q(in_charge__ishtaruser=ishtaruser) diff --git a/ishtar_common/version.py b/ishtar_common/version.py index f4b870e72..6de4cb1d6 100644 --- a/ishtar_common/version.py +++ b/ishtar_common/version.py @@ -1,5 +1,5 @@ -# 3.2.6 -VERSION = (3, 2, 6) +# 3.2.7 +VERSION = (3, 2, 7) def get_version(): diff --git a/ishtar_common/wizards.py b/ishtar_common/wizards.py index e5b8b55ba..2d000e423 100644 --- a/ishtar_common/wizards.py +++ b/ishtar_common/wizards.py @@ -1796,7 +1796,7 @@ class MultipleDeletionWizard(MultipleItemWizard): if field in res: data.append(res[field]) obj = self.current_objs[idx] - datas.append((f"{obj.class_verbose_name()} - {obj}", data)) + datas.append((f"{obj.class_verbose_name() if hasattr(obj, 'class_verbose_name') else ''} - {obj}", data)) return datas def get_context_data(self, form, **kwargs): |