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 | addb5e55aaa3ee2f5c0d9bb7a88092bbfc80ba5b (patch) | |
| tree | 3282449aa7f74c0156dc3639a8039542da55e6d8 /ishtar_common/models.py | |
| parent | b4d8ecfbe40a12def9abd8cc688c4a07d7c69838 (diff) | |
| download | Ishtar-addb5e55aaa3ee2f5c0d9bb7a88092bbfc80ba5b.tar.bz2 Ishtar-addb5e55aaa3ee2f5c0d9bb7a88092bbfc80ba5b.zip | |
Sheet files: add operation shortcut
Diffstat (limited to 'ishtar_common/models.py')
| -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) | 
