diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2020-12-08 18:49:13 +0100 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2021-02-28 12:15:22 +0100 |
commit | a51aec0053b95dcc0fb93dcfb0ad3be95ff39839 (patch) | |
tree | 3282449aa7f74c0156dc3639a8039542da55e6d8 /ishtar_common | |
parent | 46e930e758d48318bc009e3ef3a06d98610721d9 (diff) | |
download | Ishtar-a51aec0053b95dcc0fb93dcfb0ad3be95ff39839.tar.bz2 Ishtar-a51aec0053b95dcc0fb93dcfb0ad3be95ff39839.zip |
Sheet files: add operation shortcut
Diffstat (limited to 'ishtar_common')
-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 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) |