From d2d2c261cca74e80c4dc7a79a82f87328d65127d Mon Sep 17 00:00:00 2001 From: checktheroads Date: Sun, 29 Mar 2020 20:04:02 -0700 Subject: [PATCH] general cleanup --- hyperglass/configuration/models/web.py | 5 ----- hyperglass/util.py | 4 ++-- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/hyperglass/configuration/models/web.py b/hyperglass/configuration/models/web.py index 4dfde46..704b165 100644 --- a/hyperglass/configuration/models/web.py +++ b/hyperglass/configuration/models/web.py @@ -116,11 +116,6 @@ class Logo(HyperglassLevel3): """ return validate_image(value) - class Config: - """Override pydantic config.""" - - fields = {"logo_path": "path"} - class Terms(HyperglassLevel3): """Validation model for terms & conditions.""" diff --git a/hyperglass/util.py b/hyperglass/util.py index d3d395f..2439b28 100644 --- a/hyperglass/util.py +++ b/hyperglass/util.py @@ -439,7 +439,7 @@ async def build_frontend( # noqa: C901 import tempfile from pathlib import Path from aiofile import AIOFile - import ujson as json + import json from hyperglass.constants import __version__ env_file = Path("/tmp/hyperglass.env.json") # noqa: S108 @@ -471,7 +471,7 @@ async def build_frontend( # noqa: C901 log.debug("Re-initialized node_modules") try: - env_json = json.dumps(env_vars) + env_json = json.dumps(env_vars, default=str) # Create SHA256 hash from all parameters passed to UI, use as # build identifier.