summaryrefslogtreecommitdiff
path: root/plugins/module_utils/vyos.py
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/module_utils/vyos.py')
-rw-r--r--plugins/module_utils/vyos.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/module_utils/vyos.py b/plugins/module_utils/vyos.py
index bdbc2c4..f7c17f9 100644
--- a/plugins/module_utils/vyos.py
+++ b/plugins/module_utils/vyos.py
@@ -151,7 +151,7 @@ def cast_by_spec(entry, options):
spec_type = spec.get("type")
if spec_type == "int":
val = entry[key]
- if isinstance(val, list):
+ if isinstance(val, list) and len(val) <= 1:
val = val[0] if val else None
entry[key] = int(val) if val is not None else None
elif spec_type == "dict":