forked from mirrors/thatmattlove-hyperglass
change branding.logo.path to alias of branding.logo.logo_path for Pydantic v1
This commit is contained in:
parent
e79968194a
commit
9e34623ac7
1 changed files with 5 additions and 2 deletions
|
|
@ -50,7 +50,7 @@ class Branding(HyperglassModel):
|
|||
class Logo(HyperglassModel):
|
||||
"""Class model for params.branding.logo"""
|
||||
|
||||
path: str = "ui/images/hyperglass-dark.png"
|
||||
logo_path: str = "ui/images/hyperglass-dark.png"
|
||||
width: int = 384
|
||||
favicons: str = "ui/images/favicons/"
|
||||
|
||||
|
|
@ -59,11 +59,14 @@ class Branding(HyperglassModel):
|
|||
"""
|
||||
If the favicons path does not end in a '/', append it.
|
||||
"""
|
||||
chars = [char for char in value]
|
||||
chars = list(value)
|
||||
if chars[len(chars) - 1] != "/":
|
||||
chars.append("/")
|
||||
return "".join(chars)
|
||||
|
||||
class Config:
|
||||
fields = {"logo_path": "path"}
|
||||
|
||||
class PeeringDb(HyperglassModel):
|
||||
"""Class model for params.branding.peering_db"""
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue