From 1764c1dcd246111ca5833c56ee3cc3b630066374 Mon Sep 17 00:00:00 2001 From: Nick Hall Date: Sat, 6 Apr 2013 17:27:05 +0000 Subject: [PATCH] 6599: Fix matching empty fields in empty locations using regular expressions svn: r21911 --- src/Filters/Rules/Place/_HasPlace.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Filters/Rules/Place/_HasPlace.py b/src/Filters/Rules/Place/_HasPlace.py index de043e15e..4993af821 100644 --- a/src/Filters/Rules/Place/_HasPlace.py +++ b/src/Filters/Rules/Place/_HasPlace.py @@ -35,6 +35,7 @@ from gen.ggettext import gettext as _ # #------------------------------------------------------------------------- from Filters.Rules._Rule import Rule +from gen.lib import Location #------------------------------------------------------------------------- # @@ -76,9 +77,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