Fix web api

This commit is contained in:
2025-04-16 15:08:32 +02:00
parent 30692614e5
commit 2dbf216d37
2 changed files with 3 additions and 2 deletions

View File

@ -9,7 +9,6 @@ import abc
from contextlib import contextmanager from contextlib import contextmanager
from collections.abc import Iterator from collections.abc import Iterator
from click import password_option
from pydantic.networks import IPvAnyAddress, IPvAnyNetwork from pydantic.networks import IPvAnyAddress, IPvAnyNetwork
from .audit import audit_message from .audit import audit_message
@ -218,6 +217,8 @@ class ClientManagementAPI(BaseSshecretAPI):
secret_name=name, secret_name=name,
source_address=self.api_client.source, source_address=self.api_client.source,
) )
if not secret:
raise RuntimeError("Could not fetch a new secret value.")
new_value = encrypt_string(secret, client_key) new_value = encrypt_string(secret, client_key)
secrets[name] = new_value secrets[name] = new_value

View File

@ -1,8 +1,8 @@
"""WebAPI.""" """WebAPI."""
import asyncio import asyncio
from functools import lru_cache
import logging import logging
from functools import lru_cache
import secrets import secrets
import time import time