From 235c1190b003b8f69ff344d6e2ac31f4bd1d0ba2 Mon Sep 17 00:00:00 2001 From: Daniel Girtler Date: Sat, 6 May 2023 16:09:58 +1000 Subject: Fix 1763 (#1790) * Fix 1763 --------- Co-authored-by: Daniel Girtler --- archinstall/lib/profile/profiles_handler.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'archinstall/lib') diff --git a/archinstall/lib/profile/profiles_handler.py b/archinstall/lib/profile/profiles_handler.py index 824849c3..6ed95f8e 100644 --- a/archinstall/lib/profile/profiles_handler.py +++ b/archinstall/lib/profile/profiles_handler.py @@ -43,6 +43,7 @@ class ProfileHandler: data = { 'main': profile.name, 'details': [profile.name for profile in profile.current_selection], + 'custom_settings': {profile.name: profile.custom_settings for profile in profile.current_selection} } if self._url_path is not None: @@ -98,6 +99,7 @@ class ProfileHandler: profile = self.get_profile_by_name(main) if main else None valid: List[Profile] = [] + if details := profile_config.get('details', []): resolved = {detail: self.get_profile_by_name(detail) for detail in details if detail} valid = [p for p in resolved.values() if p is not None] @@ -106,6 +108,12 @@ class ProfileHandler: if invalid: log(f'No profile definition found: {invalid}') + custom_settings = profile_config.get('custom_settings', {}) + for profile in valid: + profile.set_custom_settings( + custom_settings.get(profile.name, {}) + ) + if profile is not None: profile.set_current_selection(valid) -- cgit v1.2.3-54-g00ecf