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 @@ </td> <td style="padding:2px"> - {% for rdwgfile in dwgfile.tunnelcontains.all %} + {% for rdwgfile in dwgfile.dwgcontains.all %} <a href="{% url "dwgfilesingle" rdwgfile.dwgpath %}">{{rdwgfile.dwgpath}}</a> {% endfor %} </td>