Better error msg for overwriting 3d files

This commit is contained in:
Philip Sargent 2021-11-05 23:51:10 +02:00
parent df43aae33d
commit c38aa357b7

View File

@ -1145,10 +1145,10 @@ class LoadingSurvex():
def checkUniqueness(self,fullpath):
fn = Path(fullpath).name
if fn not in self.uniquename:
self.uniquename[fn] = 1
self.uniquename[fn] = [fullpath]
else:
self.uniquename[fn] += 1
message = f" ! NON-UNIQUE survex filename, overwriting .3d file in expowebcache '{fn}' - '{fullpath}' #{self.uniquename[fn]}"
self.uniquename[fn].append(fullpath)
message = f" ! NON-UNIQUE survex filename, overwriting in expowebcache/3d/ '{fn}' - '{self.uniquename[fn]}' #{len(self.uniquename[fn])}"
print(message)
DataIssue.objects.create(parser='survex', message=message)