Commit f8832a2c authored by Mickaël Desfrênes's avatar Mickaël Desfrênes
Browse files

add Collection thumbnail

parent 20c46d12
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
__version__ = "0.1.46"
__version__ = "0.1.47"
+10 −0
Original line number Diff line number Diff line
@@ -548,6 +548,16 @@ class Collection(models.Model):
    def __str__(self):
        return "{}".format(self.title)

    @property
    def iiif_m_thumbnail_url(self) -> Union[str, None]:
        if (
            self.representative
            and self.representative.file
            and self.representative.file.should_have_iiif
        ):
            return self.representative.file.iiif_m_thumbnail_url
        return None

    def ark_destination_url(self) -> str:
        if self.ark and self.project.ark_redirect:
            return self.project.ark_redirect.replace("[CLASS]", "collection").replace(