views: avoid failing on missing parent cover
This commit is contained in:
parent
71f4d2473e
commit
26fa426416
|
@ -63,7 +63,7 @@ class ParentMixin:
|
|||
def get_context_data(self, **kwargs):
|
||||
parent = kwargs.setdefault("parent", self.parent)
|
||||
|
||||
if parent is not None:
|
||||
if parent is not None and parent.cover:
|
||||
kwargs.setdefault("cover", parent.cover.url)
|
||||
return super().get_context_data(**kwargs)
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user