From 9e34623ac77fdb5a4d84b32b497943ffb58e5c09 Mon Sep 17 00:00:00 2001 From: checktheroads Date: Mon, 30 Dec 2019 09:45:26 -0700 Subject: [PATCH] change branding.logo.path to alias of branding.logo.logo_path for Pydantic v1 --- hyperglass/configuration/models/branding.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/hyperglass/configuration/models/branding.py b/hyperglass/configuration/models/branding.py index 4155420..0996345 100644 --- a/hyperglass/configuration/models/branding.py +++ b/hyperglass/configuration/models/branding.py @@ -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"""