refactor: Simplify cache resort calls in model metadata updates and API routes

This commit is contained in:
Will Miao
2025-07-24 10:47:19 +08:00
parent 07014d98ce
commit d6145e633f
5 changed files with 8 additions and 805 deletions

View File

@@ -1094,7 +1094,7 @@ class ModelRouteUtils:
# If model_name was updated, resort the cache
if 'model_name' in metadata_updates:
cache = await scanner.get_cached_data()
await cache.resort(name_only=True)
await cache.resort()
return web.json_response({'success': True})