summaryrefslogtreecommitdiffstats
path: root/core/models/survex.py
diff options
context:
space:
mode:
authorPhilip Sargent <philip.sargent@gmail.com>2023-07-25 18:56:13 +0300
committerPhilip Sargent <philip.sargent@gmail.com>2023-07-25 18:56:13 +0300
commit5ce21564fcb0ca5d3134aa57bc2504a28983edbf (patch)
treea3b89ba20972b1744502dc025e87a4e658d7ce01 /core/models/survex.py
parent7d4ca5dae2134e7af7906176982855d810418b5a (diff)
downloadtroggle-5ce21564fcb0ca5d3134aa57bc2504a28983edbf.tar.gz
troggle-5ce21564fcb0ca5d3134aa57bc2504a28983edbf.tar.bz2
troggle-5ce21564fcb0ca5d3134aa57bc2504a28983edbf.zip
Remove unused field on survexstation class
Diffstat (limited to 'core/models/survex.py')
-rw-r--r--core/models/survex.py23
1 files changed, 12 insertions, 11 deletions
diff --git a/core/models/survex.py b/core/models/survex.py
index 37e8eb5..7c0f38e 100644
--- a/core/models/survex.py
+++ b/core/models/survex.py
@@ -86,22 +86,23 @@ class SurvexStationLookUpManager(models.Manager):
class SurvexStation(models.Model):
name = models.CharField(max_length=100)
- block = models.ForeignKey("SurvexBlock", null=True, on_delete=models.SET_NULL)
+ # block = models.ForeignKey("SurvexBlock", null=True, on_delete=models.SET_NULL)
+ # block not used since 2020. survex stations objects are only used for entrnce locations and all taken from the .3d file
objects = SurvexStationLookUpManager() # overwrites SurvexStation.objects and enables lookup()
x = models.FloatField(blank=True, null=True)
y = models.FloatField(blank=True, null=True)
z = models.FloatField(blank=True, null=True)
- def path(self):
- r = self.name
- b = self.block
- while True:
- if b.name:
- r = b.name + "." + r
- if b.parent:
- b = b.parent
- else:
- return r
+ # def path(self):
+ # r = self.name
+ # b = self.block
+ # while True:
+ # if b.name:
+ # r = b.name + "." + r
+ # if b.parent:
+ # b = b.parent
+ # else:
+ # return r
class Meta:
ordering = ("id",)