mirror of
https://github.com/getpelican/pelican.git
synced 2026-05-30 06:56:54 +02:00
Ensure URLWrapper.__str__() returns a string
This could otherwise cause an error if a setting, such as `AUTHOR`, was set to `None`.
This commit is contained in:
parent
70767ca8ba
commit
ca460ee753
1 changed files with 1 additions and 1 deletions
|
|
@ -95,7 +95,7 @@ class URLWrapper:
|
|||
return False
|
||||
|
||||
def __str__(self):
|
||||
return self.name
|
||||
return self.name or ""
|
||||
|
||||
def __repr__(self):
|
||||
return f"<{type(self).__name__} {self._name!r}>"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue