summaryrefslogtreecommitdiffstats
path: root/core/models/caves.py
diff options
context:
space:
mode:
Diffstat (limited to 'core/models/caves.py')
-rw-r--r--core/models/caves.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/core/models/caves.py b/core/models/caves.py
index 883e33c..d13ad70 100644
--- a/core/models/caves.py
+++ b/core/models/caves.py
@@ -26,13 +26,13 @@ Gcave_count = None
todo = """
- Find out why we have separate objects CaveSlug and why
- these are not just a single field on the Model. Do we ever need more
- than one slug per cave or entrance? Surely that would break everything??
+ these are not just a single field on the Model. This was Martin's idea,
+ but we are using text aliases now so we only need one slug in the data model
- Can we rewrite things to eliminate the CaveSlug and objects? Surely
foreign keys work fine ?!
-- Why do we have CaveAndEntrance objects ? Surely entranceletter belongs on the Entrance object?
+- Why do we have CaveAndEntrance objects ?
- move the aliases list from the code and put into an editable file
@@ -644,8 +644,7 @@ def GetCaveLookup():
("tempest", "1623-2023-lc-01"),
("1623-2023-kt-02", "2023-kt-02"),
- #("1623-2023-jss-01", "2023-jss-01"),
-
+
# 1626 aliases
("langgustl", "1626-354"),
("2018-dm-07", "1626-359"),
@@ -691,6 +690,8 @@ def GetCaveLookup():
ldup = []
for d in duplicates:
+ # if an alias resolves to 2 or more caves, remove it as an alias
+ # NOTE such an alisas is restored, assuming a 1623 area, when parsing Wallets - but only wallets.
Gcavelookup.pop(d)
Gcave_count.pop(d) # so should not get a duplicate msg below..
ldup.append(d)