From d3a7a9823a025f84921561882b3049765105d7fa Mon Sep 17 00:00:00 2001 From: Philip Sargent Date: Thu, 12 Oct 2023 00:58:20 +0300 Subject: remove exact station --- core/models/caves.py | 17 ----------------- 1 file changed, 17 deletions(-) (limited to 'core/models/caves.py') diff --git a/core/models/caves.py b/core/models/caves.py index bd35461..433ef87 100644 --- a/core/models/caves.py +++ b/core/models/caves.py @@ -256,7 +256,6 @@ class Entrance(TroggleModel): url = models.CharField(max_length=300, blank=True, null=True) tag_station = models.TextField(blank=True, null=True) - exact_station = models.TextField(blank=True, null=True) other_station = models.TextField(blank=True, null=True) class Meta: @@ -298,9 +297,6 @@ class Entrance(TroggleModel): letter = ce.entranceletter print(f"### LETTER {letter}") return letter - - def exact_location(self): - return self.single(self.exact_station) def other_location(self): return self.single(self.other_station) @@ -313,12 +309,6 @@ class Entrance(TroggleModel): return r + f"{s.x:0.0f}E {s.y:0.0f}N {s.z:0.0f}Alt" except: return r + f"{self.tag_station} Tag Station not in dataset" - if self.exact_station: - try: - s = SurvexStation.objects.lookup(self.exact_station) - return r + f"{s.x:0.0f}E {s.y:0.0f}N {s.z:0.0f}Alt" - except: - return r + f"{self.tag_station} Exact Station not in dataset" if self.other_station: try: s = SurvexStation.objects.lookup(self.other_station) @@ -334,8 +324,6 @@ class Entrance(TroggleModel): def best_station(self): if self.tag_station: return self.tag_station - if self.exact_station: - return self.exact_station if self.other_station: return self.other_station @@ -433,11 +421,6 @@ class Entrance(TroggleModel): station = SurvexStation.objects.get(name = self.tag_station) except: pass - if self.exact_station: - try: - station = SurvexStation.objects.get(name = self.exact_station) - except: - pass if station: return station.latlong() -- cgit v1.2.3