From 7dd5840353c0b12b55b26742a70ae05f9890e577 Mon Sep 17 00:00:00 2001 From: Philip Sargent Date: Mon, 26 Apr 2021 18:54:17 +0100 Subject: [PATCH] reanem tunnelcontains to dwgcontains --- core/models/survex.py | 2 +- parsers/surveys.py | 2 +- templates/dwgfiles.html | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/core/models/survex.py b/core/models/survex.py index 207a47f..a9eee8f 100644 --- a/core/models/survex.py +++ b/core/models/survex.py @@ -205,7 +205,7 @@ class DrawingFile(models.Model): bfontcolours = models.BooleanField(default=False) # UNUSED now, can be deleted manyscansfolders = models.ManyToManyField("Wallet") # implicitly links via folders to scans to SVX files scans = models.ManyToManyField("SingleScan") # implicitly links via scans to SVX files - tunnelcontains = models.ManyToManyField("DrawingFile") # case when its a frame type + dwgcontains = models.ManyToManyField("DrawingFile") # case when its a frame type filesize = models.IntegerField(default=0) npaths = models.IntegerField(default=0) survexfiles = models.ManyToManyField("SurvexFile") # direct link to SVX files - not populated yet diff --git a/parsers/surveys.py b/parsers/surveys.py index 2e75561..9bc8ad7 100644 --- a/parsers/surveys.py +++ b/parsers/surveys.py @@ -156,7 +156,7 @@ def find_tunnel_scan(dwgfile, path): print(message) DataIssue.objects.create(parser='Tunnel', message=message) rdwgfile = rdwgfilel[0] - dwgfile.tunnelcontains.add(rdwgfile) + dwgfile.dwgcontains.add(rdwgfile) dwgfile.save() diff --git a/templates/dwgfiles.html b/templates/dwgfiles.html index ff3a31b..a73f36a 100644 --- a/templates/dwgfiles.html +++ b/templates/dwgfiles.html @@ -29,7 +29,7 @@ - {% for rdwgfile in dwgfile.tunnelcontains.all %} + {% for rdwgfile in dwgfile.dwgcontains.all %} {{rdwgfile.dwgpath}} {% endfor %}