6599: Fix matching empty fields in empty locations using regular expressions
svn: r21911
This commit is contained in:
parent
2fd1ee8520
commit
1764c1dcd2
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user