mirror of
https://github.com/blakeblackshear/frigate.git
synced 2025-08-22 13:47:29 +02:00
Return 500 from the face registration endpoint if Frigate has not yet been restarted (#19601)
This commit is contained in:
parent
ba20b61c43
commit
353ee1228c
@ -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(
|
||||
|
Loading…
Reference in New Issue
Block a user