From 6dc151cb5057d1fc79185e95038af64164977ac8 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Sun, 30 Oct 2011 23:43:41 +0100 Subject: [PATCH] regexp is always true, check if it matches --- pandora/app/config.py | 2 +- pandora/event/models.py | 2 +- pandora/place/models.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pandora/app/config.py b/pandora/app/config.py index 3b2b47277..a0de8188a 100644 --- a/pandora/app/config.py +++ b/pandora/app/config.py @@ -52,7 +52,7 @@ def update_static(): oxjs_build = os.path.join(settings.STATIC_ROOT, 'oxjs/tools/build/build.py') if os.path.exists(oxjs_build): print 'update oxjs' - os.system('%s >/dev/null' % oxjs_build) + os.system('%s -nogeo >/dev/null' % oxjs_build) data = '' js = [] diff --git a/pandora/event/models.py b/pandora/event/models.py index e6ae546a7..24446899e 100644 --- a/pandora/event/models.py +++ b/pandora/event/models.py @@ -87,7 +87,7 @@ class Event(models.Model): value = value.replace(name.lower(), '') for name in [self.name] + list(self.alternativeNames): name = name.lower() - if name in value and re.compile('((^|\s)%s([\.,;:!?\-\/\s]|$))'%name): + if name in value and re.compile('((^|\s)%s([\.,;:!?\-\/\s]|$))'%name).findall(value): matches.append(a.id) break if not matches: diff --git a/pandora/place/models.py b/pandora/place/models.py index b592265ce..18635626d 100644 --- a/pandora/place/models.py +++ b/pandora/place/models.py @@ -97,7 +97,7 @@ class Place(models.Model): value = value.replace(name.lower(), '') for name in [self.name] + list(self.alternativeNames): name = name.lower() - if name in value and re.compile('((^|\s)%s([\.,;:!?\-\/\s]|$))'%name): + if name in value and re.compile('((^|\s)%s([\.,;:!?\-\/\s]|$))'%name).findall(value): matches.append(a.id) break if not matches: