From b135ab64e7873169e8a3c973f3ea9d0fbb18e319 Mon Sep 17 00:00:00 2001 From: goatchurch Date: Mon, 27 Jul 2009 13:43:43 +0100 Subject: [svn] full checkin. animations disabled, sorry --- utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'utils.py') diff --git a/utils.py b/utils.py index 6f62b0c..1970c7b 100644 --- a/utils.py +++ b/utils.py @@ -99,7 +99,7 @@ def href_to_wikilinks(matchobj): object actually exists. """ res=CaveDescription.objects.filter(long_name__icontains=matchobj.groupdict()['text']) - if res[0]: + if res and res[0]: return r'[[cavedescription:'+res[0].short_name+'|'+res[0].long_name+']]' else: return matchobj.group() -- cgit v1.2.3