2
0
mirror of https://expo.survex.com/repositories/troggle/.git synced 2024-11-29 05:11:52 +00:00

fix mistaken error messages

This commit is contained in:
Philip Sargent 2022-09-22 00:23:47 +03:00
parent 1971f51b52
commit e2b280ccdc

View File

@ -161,16 +161,17 @@ def get_complaints(complaints, waldata, svxfiles, files, wallet, wurl):
sx = sx + ".svx" sx = sx + ".svx"
svxfiles.append(sx) svxfiles.append(sx)
if not (Path(settings.SURVEX_DATA) / sx).is_file(): 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) complaints.append(file_complaint)
message = f"! {file_complaint}" message = f"! {file_complaint}"
print(message) print(message)
DataIssue.objects.update_or_create(parser='scans', message=message, url=wurl) # set URL to this wallet folder DataIssue.objects.update_or_create(parser='scans', message=message, url=wurl) # set URL to this wallet folder
else: else:
try: try:
svxfile = SurvexFile.objects.get(path=sx) sxpath = str(Path(sx).with_suffix(''))
svxfile = SurvexFile.objects.get(path=sxpath)
except: 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) complaints.append(file_complaint)
message = f"! {file_complaint}" message = f"! {file_complaint}"
print(message) print(message)