Skip to content

Commit a37ff0d

Browse files
authored
Merge pull request #424 from chaen/config_lhcbdiracx
fix: take ConfigSource class from extension
2 parents 7337225 + d47583b commit a37ff0d

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

diracx-cli/src/diracx/cli/internal/legacy.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121

2222
from diracx.core.config import Config
2323
from diracx.core.config.schema import Field, SupportInfo
24+
from diracx.core.extensions import select_from_extension
2425

2526
from ..utils import AsyncTyper
2627

@@ -76,8 +77,10 @@ def cs_sync(old_file: Path, new_file: Path):
7677
)
7778

7879
_apply_fixes(raw)
79-
80-
config = Config.model_validate(raw)
80+
config_class: Config = select_from_extension(group="diracx", name="config")[
81+
0
82+
].load()
83+
config = config_class.model_validate(raw)
8184
new_file.write_text(
8285
yaml.safe_dump(config.model_dump(exclude_unset=True, mode="json"))
8386
)

0 commit comments

Comments
 (0)