views: avoid failing on missing parent cover
This commit is contained in:
@ -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)
|
||||
|
||||
|
Reference in New Issue
Block a user