From 4c037b32b1a5ed122a6d468217903f0b6454181e Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Mon, 15 Jul 2019 12:09:40 +0200 Subject: Url for public find api --- ishtar_common/models.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ishtar_common') diff --git a/ishtar_common/models.py b/ishtar_common/models.py index bcde57ea3..7d7b6c872 100644 --- a/ishtar_common/models.py +++ b/ishtar_common/models.py @@ -1761,7 +1761,7 @@ class DocumentItem(object): images.append(self.main_image.public_representation()) images += [ image.public_representation() - for image in self.images_without_main_image().all() + for image in self.images_without_main_image.all() ] return {"images": images} @@ -5073,7 +5073,7 @@ class Document(BaseHistorizedItem, OwnPerms, ImageModel, ValueGetter, MainItem): return { "title": self.title, "reference": self.reference, - "type": self.source_type, + "type": self.source_type and str(self.source_type), "authors": [a.public_representation() for a in self.authors.all()], "image": image, "thumbnail": thumbnail, -- cgit v1.2.3