mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2026-03-25 13:07:30 +00:00
stop print msgs in cave model
This commit is contained in:
@@ -278,7 +278,7 @@ class Entrance(TroggleModel):
|
||||
return single
|
||||
except:
|
||||
stations = SurvexStation.objects.filter(name = station)
|
||||
print(f" # EXCEPTION looking for '{station}' in all stations. (Entrance {self})")
|
||||
# print(f" # EXCEPTION looking for '{station}' in all stations. (Entrance {self})")
|
||||
if len(stations) > 1:
|
||||
print(f" # MULTIPLE stations found with same name '{station}' in Entrance {self}:")
|
||||
for s in stations:
|
||||
@@ -298,13 +298,13 @@ class Entrance(TroggleModel):
|
||||
except:
|
||||
# will fail if no caves in cavelist or if the cave isnt in the db
|
||||
return "Z"
|
||||
print(f"singleletter() access for first cave in {cavelist=}")
|
||||
# print(f"singleletter() access for first cave in {cavelist=}")
|
||||
if ce.entranceletter == "":
|
||||
print(f"### BLANK LETTER")
|
||||
# print(f"### BLANK LETTER")
|
||||
return "Y"
|
||||
else:
|
||||
letter = ce.entranceletter
|
||||
print(f"### LETTER {letter}")
|
||||
# print(f"### LETTER {letter}")
|
||||
return letter
|
||||
|
||||
def other_location(self):
|
||||
@@ -465,12 +465,12 @@ def GetCaveLookup():
|
||||
if a.lower() in Gcavelookup:
|
||||
Gcavelookup[key] = Gcavelookup[a.lower()]
|
||||
message = f" - Warning, capitalisation error in alias list. cave for id '{a}' does not exist but {a.lower()} does."
|
||||
print(message)
|
||||
# print(message)
|
||||
DataIssue.objects.update_or_create(parser="aliases", message=message)
|
||||
elif a.upper() in Gcavelookup:
|
||||
Gcavelookup[key] = Gcavelookup[a.upper()]
|
||||
message = f" - Warning, capitalisation error in alias list. cave for id '{a}' does not exist but {a.upper()} does."
|
||||
print(message)
|
||||
# print(message)
|
||||
DataIssue.objects.update_or_create(parser="aliases", message=message)
|
||||
else:
|
||||
message = f" * alias {a} (cave key {k}) not in Gcavelookup dict. when running GetCaveLookup()"
|
||||
@@ -531,7 +531,8 @@ def GetCaveLookup():
|
||||
slug = cave.slug().lower()
|
||||
checkcaveid(cave, slug)
|
||||
except:
|
||||
print(cave, cave.slug())
|
||||
pass
|
||||
# print(cave, cave.slug())
|
||||
|
||||
# These might alse create more duplicate entries
|
||||
aliases = []
|
||||
@@ -556,7 +557,7 @@ def GetCaveLookup():
|
||||
else:
|
||||
# aliases wrong - these are different caves
|
||||
message = f" - Alias list is mis-identifying different caves {key}:{Gcavelookup[key]} != {alias}:{Gcavelookup[alias]} "
|
||||
print(message)
|
||||
# print(message)
|
||||
DataIssue.objects.create(parser="alias", message=message)
|
||||
# Gcave_count[key] += 1
|
||||
Gcavelookup[key] = Gcavelookup[alias]
|
||||
@@ -589,13 +590,13 @@ def GetCaveLookup():
|
||||
ldup.append(d)
|
||||
if ldup:
|
||||
message = f" - Ambiguous aliases being removed: {ldup}"
|
||||
print(message)
|
||||
# print(message)
|
||||
update_dataissue("aliases ok", message)
|
||||
|
||||
for c in Gcave_count:
|
||||
if Gcave_count[c] > 1:
|
||||
message = f" ** Duplicate cave id count={Gcave_count[c]} id:'{Gcavelookup[c]}' cave __str__:'{c}'"
|
||||
print(message)
|
||||
# print(message)
|
||||
update_dataissue("aliases", message)
|
||||
|
||||
return Gcavelookup
|
||||
|
||||
Reference in New Issue
Block a user