From 27e224619e2717d500c8ff089068ee7eafd21034 Mon Sep 17 00:00:00 2001 From: Martin Green Date: Mon, 11 Jul 2011 22:37:49 +0100 Subject: [PATCH] Do not make an entrance redirect for entrances without there own pages --- parsers/cavetab.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/parsers/cavetab.py b/parsers/cavetab.py index 68ea4b3..814b3a0 100644 --- a/parsers/cavetab.py +++ b/parsers/cavetab.py @@ -228,8 +228,9 @@ def LoadCaveTab(): newCaveAndEntrance.save() logging.info("Added CaveAndEntrance "+str(newCaveAndEntrance)+"\n") - f = flatpages.models.EntranceRedirect(originalURL = line[AutogenFile], entrance = newEntrance) - f.save() + if line[AutogenFile] != "": + f = flatpages.models.EntranceRedirect(originalURL = line[AutogenFile], entrance = newEntrance) + f.save() # lookup function modelled on GetPersonExpeditionNameLookup