diff options
author | Philip Sargent <philip.sargent@gmail.com> | 2023-09-27 21:44:04 +0300 |
---|---|---|
committer | Philip Sargent <philip.sargent@gmail.com> | 2023-09-27 21:44:04 +0300 |
commit | 7f9f598f115146371bcc4ead29a1388bbd035457 (patch) | |
tree | 18430c82a39126f3be2f19966f02ccc04963b5bd /core/models/caves.py | |
parent | 421b47c137acfa1a54730ef48557525aadea0992 (diff) | |
download | troggle-7f9f598f115146371bcc4ead29a1388bbd035457.tar.gz troggle-7f9f598f115146371bcc4ead29a1388bbd035457.tar.bz2 troggle-7f9f598f115146371bcc4ead29a1388bbd035457.zip |
comment updates
Diffstat (limited to 'core/models/caves.py')
-rw-r--r-- | core/models/caves.py | 11 |
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) |