fixed: channel error when DB: local is selected

This commit is contained in:
Dr.Lt.Data
2025-03-24 01:17:07 +09:00
parent d889df4c89
commit 87a652d038
3 changed files with 9 additions and 3 deletions

View File

@@ -1421,6 +1421,12 @@ async def disable_node(request):
async def check_whitelist_for_model(item):
json_obj = await core.get_data_by_mode('cache', 'model-list.json')
for x in json_obj.get('models', []):
if x['save_path'] == item['save_path'] and x['base'] == item['base'] and x['filename'] == item['filename']:
return True
json_obj = await core.get_data_by_mode('local', 'model-list.json')
for x in json_obj.get('models', []):
if x['save_path'] == item['save_path'] and x['base'] == item['base'] and x['filename'] == item['filename']:
return True