diff options
author | Philip Sargent <philip.sargent@klebos.com> | 2020-06-24 00:36:32 +0100 |
---|---|---|
committer | Philip Sargent <philip.sargent@klebos.com> | 2020-06-24 00:36:32 +0100 |
commit | d6c4ffca5ad00914d0e6449c666e911ca52efa4f (patch) | |
tree | ef6f9155b79e848e673128102865f3d9d30d1496 | |
parent | c91aa4be475fac06e6d4b55804fac4debc5c1dbf (diff) | |
download | troggle-d6c4ffca5ad00914d0e6449c666e911ca52efa4f.tar.gz troggle-d6c4ffca5ad00914d0e6449c666e911ca52efa4f.tar.bz2 troggle-d6c4ffca5ad00914d0e6449c666e911ca52efa4f.zip |
tunnelfile.scans name change for compatibility
-rw-r--r-- | core/models_survex.py | 4 | ||||
-rw-r--r-- | parsers/surveys.py | 2 | ||||
-rw-r--r-- | templates/tunnelfiles.html | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/core/models_survex.py b/core/models_survex.py index a5cda3d..7f316c7 100644 --- a/core/models_survex.py +++ b/core/models_survex.py @@ -217,8 +217,8 @@ class TunnelFile(models.Model): tunnelpath = models.CharField(max_length=200) tunnelname = models.CharField(max_length=200) bfontcolours = models.BooleanField(default=False) - manyscansfolders = models.ManyToManyField("ScansFolder") - survexscans = models.ManyToManyField("SingleScan") + manyscansfolders = models.ManyToManyField("ScansFolder") + scans = models.ManyToManyField("SingleScan") survexblocks = models.ManyToManyField("SurvexBlock") tunnelcontains = models.ManyToManyField("TunnelFile") # case when its a frame type filesize = models.IntegerField(default=0) diff --git a/parsers/surveys.py b/parsers/surveys.py index 1999fb5..bc99e1a 100644 --- a/parsers/surveys.py +++ b/parsers/surveys.py @@ -135,7 +135,7 @@ def FindTunnelScan(tunnelfile, path): if scansfolder: tunnelfile.manyscansfolders.add(scansfolder) if scansfile: - tunnelfile.survexscans.add(scansfile) + tunnelfile.scans.add(scansfile) elif path and not re.search(rb"\.(?:png|jpg|pdf|jpeg)$(?i)", path): name = os.path.split(path)[1] diff --git a/templates/tunnelfiles.html b/templates/tunnelfiles.html index 52a6895..472bd59 100644 --- a/templates/tunnelfiles.html +++ b/templates/tunnelfiles.html @@ -23,7 +23,7 @@ </td> <td> - {% for singlescan in tunnelfile.survexscans.all %} + {% for singlescan in tunnelfile.scans.all %} <a href="{{singlescan.get_absolute_url}}">{{singlescan.name}}</a> {% endfor %} </td> |