summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/models/survex.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/core/models/survex.py b/core/models/survex.py
index 0e336ab..469628a 100644
--- a/core/models/survex.py
+++ b/core/models/survex.py
@@ -130,6 +130,7 @@ class SurvexBlockLookUpManager(models.Manager):
class SurvexBlock(models.Model):
"""One begin..end block within a survex file. The basic element of a survey trip.
Multiple anonymous survex blocks are possible within the same surfex file
+ Blocks can span several *included survexfile though.
"""
objects = SurvexBlockLookUpManager() # overwrites SurvexBlock.objects and enables lookup()
@@ -139,8 +140,9 @@ class SurvexBlock(models.Model):
date = models.DateField(blank=True, null=True)
expedition = models.ForeignKey("Expedition", blank=True, null=True, on_delete=models.SET_NULL)
-
- survexfile = models.ForeignKey("SurvexFile", blank=True, null=True, on_delete=models.SET_NULL)
+ # if the survexfile object is deleted, then all teh suvex-blocks in it should be too,
+ # though a block can span more than one file...
+ survexfile = models.ForeignKey("SurvexFile", blank=True, null=True, on_delete=models.CASCADE)
survexpath = models.CharField(max_length=200) # the path for the survex stations
scanswallet = models.ForeignKey(
@@ -209,7 +211,8 @@ class SingleScan(models.Model):
class DrawingFile(models.Model):
- """A file holding a Therion (several types) or a Tunnel drawing"""
+ """A file holding a Therion (several types) or a Tunnel drawing
+ Most of the implied capabilities are not implemented yet"""
dwgpath = models.CharField(max_length=200)
dwgname = models.CharField(max_length=200)