j-chim's picture
Deploy eval-entity-registry service
beadfdf verified
Raw History Blame Contribute Delete
282 Bytes
from fastapi import Depends, HTTPException
from eval_entity_registry.config import settings
def check_writable():
if settings.read_only:
raise HTTPException(status_code=405, detail="Write operations disabled in read-only mode")
writable = [Depends(check_writable)]