瀏覽代碼

Fixed error when the active Config is deleted and rest only one to restore. (#16408)

Julio Oliveira at Encora 2 年之前
父節點
當前提交
b10fb67ce9
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      netbox/core/views.py

+ 1 - 1
netbox/core/views.py

@@ -224,7 +224,7 @@ class ConfigRevisionRestoreView(ContentTypePermissionRequiredMixin, View):
         for param in PARAMS:
             params.append((
                 param.name,
-                current_config.data.get(param.name, None),
+                current_config.data.get(param.name, None) if current_config else None,
                 candidate_config.data.get(param.name, None)
             ))