From a51aec0053b95dcc0fb93dcfb0ad3be95ff39839 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Tue, 8 Dec 2020 18:49:13 +0100 Subject: Sheet files: add operation shortcut --- ishtar_common/models.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'ishtar_common/models.py') diff --git a/ishtar_common/models.py b/ishtar_common/models.py index 6eb7fac6d..e7d948d63 100644 --- a/ishtar_common/models.py +++ b/ishtar_common/models.py @@ -1880,12 +1880,15 @@ class TitleType(GenderedType): return doc def get_values(self, prefix='', **kwargs): - return { + dct = { prefix: self.label, prefix + "id": self.pk, prefix + "txt_idx": self.txt_idx, prefix + "long_title": self.long_title } + if prefix: + dct[prefix[:-1]] = self.label + return dct post_save.connect(post_save_cache, sender=TitleType) -- cgit v1.2.3