summaryrefslogtreecommitdiffstats
path: root/parsers
diff options
context:
space:
mode:
Diffstat (limited to 'parsers')
-rw-r--r--parsers/surveys.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/parsers/surveys.py b/parsers/surveys.py
index 73161f2..a0cf520 100644
--- a/parsers/surveys.py
+++ b/parsers/surveys.py
@@ -150,7 +150,7 @@ def find_tunnel_scan(dwgfile, path):
elif path and not re.search(r"\.(?:png|jpg|pdf|jpeg|gif|pdf)$(?i)", path):
name = os.path.split(path)[1]
- rdwgfilel = DrawingFile.objects.filter(tunnelname=name)
+ rdwgfilel = DrawingFile.objects.filter(dwgname=name)
if len(rdwgfilel):
message = "! Two paths with same name [{}]: {}".format(path, name)
print(message)
@@ -206,7 +206,7 @@ def settherionfileinfo(filetuple):
# scrap blownout -projection plan -scale [-81.0 -42.0 216.0 -42.0 0.0 0.0 7.5438 0.0 m]
for xth_me in rx_xth_me.findall(ttext):
- message = f'! Un-parsed image filename: {therionfile.tunnelname} : {xth_me.split()[-3]} - {therionfile.dwgpath}'
+ message = f'! Un-parsed image filename: {therionfile.dwgname} : {xth_me.split()[-3]} - {therionfile.dwgpath}'
#print(message)
DataIssue.objects.create(parser='Therion', message=message)
findimageinsert(therionfile, xth_me)
@@ -214,7 +214,7 @@ def settherionfileinfo(filetuple):
for inp in rx_input.findall(ttext):
# if this 'input' is a .th2 file we have already seen, then we can assign this as a sub-file
# but we would need to disentangle to get the current path properly
- message = f'! Un-set Therion .th2 input: - {therionfile.tunnelname} : {inp} - {therionfile.dwgpath}'
+ message = f'! Un-set Therion .th2 input: - {therionfile.dwgname} : {inp} - {therionfile.dwgpath}'
#print(message)
DataIssue.objects.create(parser='Therion', message=message)
findimportinsert(therionfile, inp)
@@ -278,17 +278,17 @@ def load_drawings_files():
drawingsdirs.append(lf) # lunatic! adding to list in middle of list while loop!
elif f[-4:] == ".xml":
# Always creates new
- dwgfile = DrawingFile(dwgpath=lf, tunnelname=os.path.split(f[:-4])[1])
+ dwgfile = DrawingFile(dwgpath=lf, dwgname=os.path.split(f[:-4])[1])
dwgfile.save()
all_xml.append(('xml',dwgfile))
elif f[-3:] == ".th":
# Always creates new
- dwgfile = DrawingFile(dwgpath=lf, tunnelname=os.path.split(f[:-4])[1])
+ dwgfile = DrawingFile(dwgpath=lf, dwgname=os.path.split(f[:-4])[1])
dwgfile.save()
all_xml.append(('th',dwgfile))
elif f[-4:] == ".th2":
# Always creates new
- dwgfile = DrawingFile(dwgpath=lf, tunnelname=os.path.split(f[:-4])[1])
+ dwgfile = DrawingFile(dwgpath=lf, dwgname=os.path.split(f[:-4])[1])
dwgfile.save()
all_xml.append(('th2',dwgfile))