diff options
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",) |