mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Fixes #13727: Fix exception when viewing rendered config for VM without a role assigned
This commit is contained in:
@@ -69,7 +69,7 @@ class RenderConfigMixin(models.Model):
|
||||
"""
|
||||
if 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
|
||||
if self.platform and self.platform.config_template:
|
||||
return self.platform.config_template
|
||||
|
Reference in New Issue
Block a user