From d65cead212dc781a6dbbe35ea15eea7b75023da9 Mon Sep 17 00:00:00 2001 From: Jonathan Senecal Date: Fri, 5 Jun 2020 12:34:09 -0400 Subject: [PATCH] Return an empty list if value is None --- netbox/utilities/forms.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/netbox/utilities/forms.py b/netbox/utilities/forms.py index 979b6ac32..3d8dbe33f 100644 --- a/netbox/utilities/forms.py +++ b/netbox/utilities/forms.py @@ -530,6 +530,8 @@ class ExpandableNameField(forms.CharField): """ def to_python(self, value): + if value is None: + return list() if re.search(ALPHANUMERIC_EXPANSION_PATTERN, value): return list(expand_alphanumeric_pattern(value)) return [value]