2
0
mirror of https://expo.survex.com/repositories/troggle/.git synced 2025-12-17 05:17:19 +00:00

deal with absent uneeded items

This commit is contained in:
2024-07-02 10:55:11 +03:00
parent c51f76ed83
commit a6730b1b3a
2 changed files with 38 additions and 21 deletions

View File

@@ -712,14 +712,14 @@ def GetCaveLookup():
("loveshack", "1626-2018-ad-03"),
("crushed-garlic", "1626-2018-ad-03"),
# Renaming cave ids which end in a letter
("2002-XX", "1623-2002-FB-01"),
("2002-X09B", "1623-2002-XB09"),
("2007-neu", "1623-2007-NEU-01"),
("BuzzardHole", "1626-2023-BZ-01"),
("2023-BuzzardHole", "1626-2023-BZ-01"),
("1626-2023-BuzzardHole", "1626-2023-BZ-01"),
("1626-2023-buzzardhole","1626-2023-BZ-01"),
# Renaming cave ids which end in a letter NB targets must be LOWER CASE
("2002-XX", "1623-2002-fb-01"),
("2002-X09B", "1623-2002-xb09"),
("2007-neu", "1623-2007-neu-01"),
("BuzzardHole", "1626-2023-Bbz-01"),
("2023-BuzzardHole", "1626-2023-bz-01"),
("1626-2023-BuzzardHole", "1626-2023-bz-01"),
("1626-2023-buzzardhole","1626-2023-bz-01"),
]
@@ -737,9 +737,15 @@ def GetCaveLookup():
# Gcave_count[key] += 1
Gcavelookup[key] = Gcavelookup[alias]
else:
message = f" * Coding or cave existence mistake, cave for id '{alias}' does not exist. Expecting to set alias '{key}' to it"
print(message)
DataIssue.objects.update_or_create(parser="aliases", message=message)
if alias.lower() in Gcavelookup:
Gcavelookup[key] = Gcavelookup[alias.lower()]
message = f" - Warning, capitalisation error in alias list. cave for id '{alias}' does not exist but {alias.lower()} does."
print(message)
DataIssue.objects.update_or_create(parser="aliases", message=message)
else:
message = f" * Coding or cave existence mistake, cave for id '{alias}' does not exist. Expecting to set alias '{key}' to it"
print(message)
DataIssue.objects.update_or_create(parser="aliases", message=message)
addmore = {}
for id in Gcavelookup: