فهرست منبع

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

Jeremy Stretch 2 سال پیش
والد
کامیت
c7dd4206c8
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  1. 1 1
      netbox/dcim/models/mixins.py

+ 1 - 1
netbox/dcim/models/mixins.py

@@ -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