Fix broken configs with non-existent components (#5993)

This commit is contained in:
Jesse Hills 2023-12-22 21:10:35 +13:00 committed by GitHub
parent 46255ad4df
commit 46c4c61b40
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -315,7 +315,11 @@ class LoadValidationStep(ConfigValidationStep):
return
result.add_output_path([self.domain], self.domain)
component = get_component(self.domain)
if component.multi_conf_no_default and isinstance(self.conf, core.AutoLoad):
if (
component is not None
and component.multi_conf_no_default
and isinstance(self.conf, core.AutoLoad)
):
self.conf = []
result[self.domain] = self.conf
path = [self.domain]