Files

10 lines
333 B
Python
Raw Permalink Normal View History

from fastapi import HTTPException
from services import pki
def forbid_during_restore():
"""Dependency of the routes that change the PKI, the profiles or the settings: 409 while a
backup restore replaces them."""
if pki.is_restore_running():
raise HTTPException(status_code=409, detail=pki.RESTORE_RUNNING_MSG)