Do not make an entrance redirect for entrances without there own pages

This commit is contained in:
Martin Green 2011-07-11 22:37:49 +01:00
parent 8c2cf48195
commit 27e224619e

View File

@ -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