Correctly remove classification model from config (#20772)

* Correctly remove classification model from config

* Undo

* fix

* Use existing config update API and dynamically remove models that were running

* Set update message for face
This commit is contained in:
Nicolas Mowen
2025-11-03 08:01:30 -07:00
committed by GitHub
parent 740c618240
commit 31fa87ce73
5 changed files with 89 additions and 72 deletions
+6 -5
View File
@@ -403,12 +403,13 @@ def config_set(request: Request, body: AppConfigSetBody):
settings,
)
else:
# Handle nested config updates (e.g., config/classification/custom/{name})
# Generic handling for global config updates
settings = config.get_nested_object(body.update_topic)
if settings:
request.app.config_publisher.publisher.publish(
body.update_topic, settings
)
# Publish None for removal, actual config for add/update
request.app.config_publisher.publisher.publish(
body.update_topic, settings
)
return JSONResponse(
content=(