From 60cd9b8d863570da654afd93bafbed88e6943804 Mon Sep 17 00:00:00 2001 From: iLLiCiTiT Date: Mon, 1 Mar 2021 11:44:22 +0100 Subject: [PATCH] added validation of not set value --- pype/lib/profiles_filtering.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pype/lib/profiles_filtering.py b/pype/lib/profiles_filtering.py index 202f4e7247..08a30ce688 100644 --- a/pype/lib/profiles_filtering.py +++ b/pype/lib/profiles_filtering.py @@ -80,6 +80,11 @@ def validate_value_by_regexes(value, in_list): if "*" in in_list: return 0 + # If value is not set and in list has specific values then resolve value + # as not matching. + if not value: + return -1 + regexes = compile_list_of_regexes(in_list) for regex in regexes: if re.match(regex, value):