mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2025-12-16 08:37:16 +00:00
fixing cave slug <caveslug> issues
This commit is contained in:
@@ -114,6 +114,9 @@ class Cave(TroggleModel):
|
||||
slugs = self.caveslug_set.filter()
|
||||
if slugs:
|
||||
return slugs[0].slug
|
||||
|
||||
def newslug(self):
|
||||
return f"{self.areacode}-{self.number()}"
|
||||
|
||||
def ours(self):
|
||||
return bool(re.search(r"CUCC", self.explorers))
|
||||
@@ -522,7 +525,7 @@ def GetCaveLookup():
|
||||
checkcaveid(cave, slug)
|
||||
|
||||
# These might alse create more duplicate entries
|
||||
# Yes, this should be set in, and imported from, settings.py
|
||||
# Yes, this should be set in, and imported from, an easily editable file
|
||||
# On reset, these aliases only work if the cave already properly exists with an entry in :expoweb:/cave_data/
|
||||
# but as the aliases are recomputed repeatedly, eventually they work on PENDING caves too
|
||||
aliases = [
|
||||
@@ -646,6 +649,8 @@ def GetCaveLookup():
|
||||
("2002-x12", "2005-07"),
|
||||
("2002-x13", "1623-2005-06"),
|
||||
("2002-x14", "2005-05"),
|
||||
|
||||
# various funnies to cope with cave names used in logbooks
|
||||
("kh", "1623-161"),
|
||||
("161-kh", "1623-161"),
|
||||
("204-steinBH", "1623-204"),
|
||||
@@ -659,10 +664,12 @@ def GetCaveLookup():
|
||||
("fgh", "1623-290"),
|
||||
("fishface", "1623-290"),
|
||||
("gsh", "1623-291"),
|
||||
("1623-2023-lc-01", "1623-318"),
|
||||
("tempest", "1623-2023-lc-01"),
|
||||
|
||||
("1623-2023-kt-02", "2023-kt-02"),
|
||||
|
||||
|
||||
# from the git output after Becka's changes, used to construct this list..
|
||||
# rename caves-1623/{2023-ASH-15/2023-ASH-15.svx => 303/303.svx} (94%)
|
||||
# rename caves-1623/{2023-mg-02/2023-mg-02.svx => 304/304.svx} (90%)
|
||||
# rename caves-1623/{2023-mg-01/2023-mg-01.svx => 305/305.svx} (94%)
|
||||
@@ -694,7 +701,7 @@ def GetCaveLookup():
|
||||
("2023-jss-01", "1623-315"),
|
||||
("2023-kt-01", "1623-316"),
|
||||
|
||||
# 1626 aliases2023-mg-01/2023-mg-01.svx => 305
|
||||
# 1626
|
||||
("langgustl", "1626-354"),
|
||||
("2018-dm-07", "1626-359"),
|
||||
("1626-2018-dm-07", "1626-359"),
|
||||
|
||||
Reference in New Issue
Block a user