Skip to content

Commit

Permalink
Check if url has been set in Page model
Browse files Browse the repository at this point in the history
  • Loading branch information
pmontepagano committed Sep 7, 2021
1 parent a64d181 commit 8818ae4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion wagtail_pdf_view/mixins.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ def __init__(self, *args, **kwargs):
name = route_args[0]

url = self.url
if not url.endswith('/'):
if url and not url.endswith('/'):
url += '/'

setattr(self, "url_"+key, url+self.reverse_subpage(name))
Expand Down

0 comments on commit 8818ae4

Please sign in to comment.