From 8a2d14d435235d879ce267587bdb1eed86abc143 Mon Sep 17 00:00:00 2001
From: Frederico Sequeira <frederico.sequeira@ext.ec.europa.eu>
Date: Tue, 14 Jan 2025 17:23:18 +0000
Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=91=20Fix=20error=20in=20validation?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 netbox_sys_plugin/validators.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/netbox_sys_plugin/validators.py b/netbox_sys_plugin/validators.py
index 3425f70..8dd0c5d 100644
--- a/netbox_sys_plugin/validators.py
+++ b/netbox_sys_plugin/validators.py
@@ -12,9 +12,9 @@ def validate_extra_config_structure(value):
     if len(value) != 1:
         raise ValidationError("The structure must contain exactly one key.")
 
-    for fields in value.items():
+    for struct_name, fields in value.items():
         if not isinstance(fields, list):
-            raise ValidationError("The value of the root key must be a list.")
+            raise ValidationError(f"For {struct_name} the value of the root key must be a list.")
 
         for field in fields:
             if not isinstance(field, dict):
-- 
GitLab