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

cures weird bug

This commit is contained in:
Philip Sargent 2022-10-15 17:26:09 +03:00
parent 3b106a3803
commit 2fa298cae9

View File

@ -173,10 +173,10 @@ def get_complaints(complaints, waldata, svxfiles, files, wallet, wurl):
svxfile = SurvexFile.objects.get(path=sxpath)
except MultipleObjectsReturned:
# can happen if connecting a wallet to a survex file.. i think..
svxfiles = SurvexFile.objects.filter(path=sxpath)
for s in svxfiles:
QSsvxfiles = SurvexFile.objects.filter(path=sxpath)
for s in QSsvxfiles:
print(s.path, s.cave, s.survexdirectory)
svxfile = svxfiles[0] # dont' know how this happened, fix later..
svxfile = QSsvxfiles[0] # dont' know how this happened, fix later..
except:
file_complaint = f"{wallet} Survex file {sx} exists, but is not registered in the database {sxpath}. How?.."
complaints.append(file_complaint)