f
This commit is contained in:
@@ -380,7 +380,7 @@ class ConfigModal(ModalScreen):
|
||||
if stype in classes:
|
||||
cls = classes[stype]
|
||||
if hasattr(cls, "config") and callable(cls.config):
|
||||
for field_def in cls.config():
|
||||
for field_def in cls.config_schema():
|
||||
k = field_def.get("key")
|
||||
if k:
|
||||
provider_schema_map[k.upper()] = field_def
|
||||
@@ -395,7 +395,7 @@ class ConfigModal(ModalScreen):
|
||||
try:
|
||||
pcls = get_provider_class(item_name)
|
||||
if pcls and hasattr(pcls, "config") and callable(pcls.config):
|
||||
for field_def in pcls.config():
|
||||
for field_def in pcls.config_schema():
|
||||
k = field_def.get("key")
|
||||
if k:
|
||||
provider_schema_map[k.upper()] = field_def
|
||||
@@ -667,7 +667,7 @@ class ConfigModal(ModalScreen):
|
||||
for stype, cls in all_classes.items():
|
||||
if hasattr(cls, "config") and callable(cls.config):
|
||||
try:
|
||||
if cls.config():
|
||||
if cls.config_schema():
|
||||
options.append(stype)
|
||||
except Exception:
|
||||
pass
|
||||
@@ -680,7 +680,7 @@ class ConfigModal(ModalScreen):
|
||||
pcls = get_provider_class(ptype)
|
||||
if pcls and hasattr(pcls, "config") and callable(pcls.config):
|
||||
try:
|
||||
if pcls.config():
|
||||
if pcls.config_schema():
|
||||
options.append(ptype)
|
||||
except Exception:
|
||||
pass
|
||||
@@ -856,7 +856,7 @@ class ConfigModal(ModalScreen):
|
||||
cls = classes[stype]
|
||||
# Use schema for defaults if present
|
||||
if hasattr(cls, "config") and callable(cls.config):
|
||||
for field_def in cls.config():
|
||||
for field_def in cls.config_schema():
|
||||
key = field_def.get("key")
|
||||
if key:
|
||||
val = field_def.get("default", "")
|
||||
@@ -890,7 +890,7 @@ class ConfigModal(ModalScreen):
|
||||
if pcls:
|
||||
# Use schema for defaults
|
||||
if hasattr(pcls, "config") and callable(pcls.config):
|
||||
for field_def in pcls.config():
|
||||
for field_def in pcls.config_schema():
|
||||
key = field_def.get("key")
|
||||
if key:
|
||||
new_config[key] = field_def.get("default", "")
|
||||
@@ -988,7 +988,7 @@ class ConfigModal(ModalScreen):
|
||||
if pcls:
|
||||
# Collect required keys from schema
|
||||
if hasattr(pcls, "config") and callable(pcls.config):
|
||||
for field_def in pcls.config():
|
||||
for field_def in pcls.config_schema():
|
||||
if field_def.get("required"):
|
||||
k = field_def.get("key")
|
||||
if k and k not in required_keys:
|
||||
|
||||
@@ -153,6 +153,9 @@ class SearchModal(ModalScreen):
|
||||
return
|
||||
|
||||
source = self.source_select.value
|
||||
if not source or not isinstance(source, str):
|
||||
logger.warning("[search-modal] No source selected")
|
||||
return
|
||||
|
||||
# Clear existing results
|
||||
self.results_table.clear(columns=True)
|
||||
|
||||
Reference in New Issue
Block a user