summaryrefslogtreecommitdiff
path: root/ishtar_common/models.py
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2020-09-09 14:53:28 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2021-02-28 12:15:21 +0100
commitcc701ee77ee21e2be07710a14759fb873e82f403 (patch)
treeb6a9fed5f935dfa49ddc192ad5269a7545f01408 /ishtar_common/models.py
parent1a4af35045908e4285dc18bce3733f069fada220 (diff)
downloadIshtar-cc701ee77ee21e2be07710a14759fb873e82f403.tar.bz2
Ishtar-cc701ee77ee21e2be07710a14759fb873e82f403.zip
Sheet organization: show publication
Diffstat (limited to 'ishtar_common/models.py')
-rw-r--r--ishtar_common/models.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/ishtar_common/models.py b/ishtar_common/models.py
index df9fe0c20..001c1894f 100644
--- a/ishtar_common/models.py
+++ b/ishtar_common/models.py
@@ -5423,6 +5423,7 @@ class Document(BaseHistorizedItem, QRCodeItem, OwnPerms, ImageModel,
'authors__cached_label': 'authors__cached_label',
'authors__person__pk': 'authors__person__pk',
"container_id": "container_id",
+ 'publisher__pk': 'publisher__pk'
}
# alternative names of fields for searches
@@ -5663,8 +5664,9 @@ class Document(BaseHistorizedItem, QRCodeItem, OwnPerms, ImageModel,
source_type = models.ForeignKey(SourceType, verbose_name=_("Type"),
on_delete=models.SET_NULL,
null=True, blank=True)
- publisher = models.ForeignKey(Organization, verbose_name=_("Publisher"),
- blank=True, null=True)
+ publisher = models.ForeignKey(
+ Organization, verbose_name=_("Publisher"), blank=True, null=True,
+ related_name='publish')
licenses = models.ManyToManyField(LicenseType, verbose_name=_("License"),
blank=True)
tags = models.ManyToManyField(DocumentTag, verbose_name=_("Tags"),