diff --git a/core/views/uploads.py b/core/views/uploads.py index 79fdae7..3773e4f 100644 --- a/core/views/uploads.py +++ b/core/views/uploads.py @@ -161,16 +161,17 @@ def get_complaints(complaints, waldata, svxfiles, files, wallet, wurl): sx = sx + ".svx" svxfiles.append(sx) if not (Path(settings.SURVEX_DATA) / sx).is_file(): - file_complaint = f"{wallet} Incorrect survex file name. {sx} was not found in LOSER repo" + file_complaint = f"{wallet} Incorrect survex file name. File {sx} was not found in LOSER repo" complaints.append(file_complaint) message = f"! {file_complaint}" print(message) DataIssue.objects.update_or_create(parser='scans', message=message, url=wurl) # set URL to this wallet folder else: try: - svxfile = SurvexFile.objects.get(path=sx) + sxpath = str(Path(sx).with_suffix('')) + svxfile = SurvexFile.objects.get(path=sxpath) except: - file_complaint = f"{wallet} Survex file name {sx} was not imported via a *include statement so it not available." + file_complaint = f"{wallet} Survex file {sx} exists, but is not registered as imported via a *include {sxpath}." complaints.append(file_complaint) message = f"! {file_complaint}" print(message)