From a7eaa74191b2f6f172c8617d855a36fb07c1b503 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Fri, 8 Mar 2019 21:20:38 +0100 Subject: [PATCH] fix MATCH_EXACT not working as intended --- passbook/core/models.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/passbook/core/models.py b/passbook/core/models.py index 7772a6d0f..582b1aa29 100644 --- a/passbook/core/models.py +++ b/passbook/core/models.py @@ -288,6 +288,8 @@ class FieldMatcherPolicy(Policy): if self.match_action == FieldMatcherPolicy.MATCH_REGEXP: pattern = re.compile(self.value) passes = bool(pattern.match(user_field_value)) + if self.match_action == FieldMatcherPolicy.MATCH_EXACT: + passes = user_field_value == self.value LOGGER.debug("User got '%r'", passes) return passes