Fixes #13727: Fix exception when viewing rendered config for VM without a role assigned

This commit is contained in:
Jeremy Stretch 2023-09-18 08:44:42 -04:00
parent 79bf12a8fe
commit c7dd4206c8

View File

@ -69,7 +69,7 @@ class RenderConfigMixin(models.Model):
""" """
if self.config_template: if self.config_template:
return self.config_template return self.config_template
if self.role.config_template: if self.role and self.role.config_template:
return self.role.config_template return self.role.config_template
if self.platform and self.platform.config_template: if self.platform and self.platform.config_template:
return self.platform.config_template return self.platform.config_template