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

Entrance locations showing lat long screwups

This commit is contained in:
2023-09-16 22:46:17 +03:00
parent a85f859f88
commit 017f916ef9
4 changed files with 84 additions and 9 deletions

View File

@@ -284,6 +284,29 @@ def eastings(request):
if e.lat_wgs84 or e.long_wgs84:
ents.append(e)
for e in ents:
try:
ts = e.tag_station
if ts:
e.tag_ts = SurvexStation.objects.get(name=ts)
print(f"{e} {e.tag_ts} {e.tag_ts.lat()} {e.tag_ts.long()}")
es = e.exact_station
if es:
e.tag_es = SurvexStation.objects.get(name=es)
print(f"{e} {e.tag_es} {e.tag_es.lat()} {e.tag_es.long()}")
os = e.other_station
if os:
e.tag_os = SurvexStation.objects.get(name=os)
print(f"{e} {e.tag_os} {e.tag_os.lat()} {e.tag_os.long()}")
except:
e.tag_ss = None
e.tag_es = None
e.tag_os = None
# print(f"exception for {e}")
stations = SurvexStation.objects.all()
return render(request, "eastings.html", {"ents": ents, "stations": stations})