diff options
author | Philip Sargent <philip.sargent@gmail.com> | 2023-07-25 18:56:13 +0300 |
---|---|---|
committer | Philip Sargent <philip.sargent@gmail.com> | 2023-07-25 18:56:13 +0300 |
commit | 5ce21564fcb0ca5d3134aa57bc2504a28983edbf (patch) | |
tree | a3b89ba20972b1744502dc025e87a4e658d7ce01 /core/models/survex.py | |
parent | 7d4ca5dae2134e7af7906176982855d810418b5a (diff) | |
download | troggle-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.py | 23 |
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",) |