Просмотр исходного кода

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

Julio Oliveira at Encora 1 год назад
Родитель
Сommit
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:
         for param in PARAMS:
             params.append((
             params.append((
                 param.name,
                 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)
                 candidate_config.data.get(param.name, None)
             ))
             ))