From cb028cea565fa1b053765cb5e1c1f0c4c58032be Mon Sep 17 00:00:00 2001 From: Nick Hall Date: Sat, 6 Apr 2013 17:27:26 +0000 Subject: [PATCH] 6599: Fix matching empty fields in empty locations using regular expressions svn: r21913 --- gramps/gen/filters/rules/place/_hasplace.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gramps/gen/filters/rules/place/_hasplace.py b/gramps/gen/filters/rules/place/_hasplace.py index b92754a63..ea2f5be61 100644 --- a/gramps/gen/filters/rules/place/_hasplace.py +++ b/gramps/gen/filters/rules/place/_hasplace.py @@ -36,6 +36,7 @@ _ = glocale.get_translation().gettext # #------------------------------------------------------------------------- from .. import Rule +from ....lib import Location #------------------------------------------------------------------------- # @@ -77,9 +78,9 @@ class HasPlace(Rule): return False def apply_location(self, loc): - # Empty locaiton does not match anything if not loc: - return False + # Allow regular expressions to match empty fields + loc = Location() if not self.match_substring(1, loc.get_street()): return False