Return 500 from the face registration endpoint if Frigate has not yet been restarted (#19601)

This commit is contained in:
Josh Hawkins 2025-08-18 15:49:50 -05:00 committed by GitHub
parent ba20b61c43
commit 353ee1228c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -214,7 +214,7 @@ async def register_face(request: Request, name: str, file: UploadFile):
)
context: EmbeddingsContext = request.app.embeddings
result = context.register_face(name, await file.read())
result = None if context is None else context.register_face(name, await file.read())
if not isinstance(result, dict):
return JSONResponse(