diff --git a/relay/database/connection.py b/relay/database/connection.py index 355a8e6..5ee3aed 100644 --- a/relay/database/connection.py +++ b/relay/database/connection.py @@ -138,7 +138,7 @@ class Connection(SqlConnection): params = { "key": key, "value": data.get(key, serialize = True), - "type": "LogLevel" if field.type == "logging.LogLevel" else field.type # type: ignore + "type": "LogLevel" if field.type == "logging.LogLevel" else field.type } with self.run("put-config", params): diff --git a/relay/manage.py b/relay/manage.py index b9a8410..53e2a47 100644 --- a/relay/manage.py +++ b/relay/manage.py @@ -213,7 +213,7 @@ def cli_db_maintenance(ctx: click.Context) -> None: def cli_convert(ctx: click.Context, old_config: str) -> None: "Convert an old config and jsonld database to the new format." - old_config = Path(old_config).expanduser().resolve() if old_config else ctx.obj.config.path + old_config = str(Path(old_config).expanduser().resolve()) if old_config else ctx.obj.config.path backup = ctx.obj.config.path.parent.joinpath(f"{ctx.obj.config.path.stem}.backup.yaml") if str(old_config) == str(ctx.obj.config.path) and not backup.exists():