new BUG-87 - faces with empty locn and no formal connection between file and face? Quick hack added to files as well to at least prevent a 500 server fault, and show it to us if it happens again

This commit is contained in:
2022-04-30 19:38:08 +10:00
parent 4a5bde559d
commit cc478cb722
2 changed files with 26 additions and 2 deletions

View File

@@ -723,7 +723,15 @@ def view(id):
continue
# put locn data back into array format
for face in e.file_details.faces:
face.locn = json.loads(face.locn)
if face.locn:
face.locn = json.loads(face.locn)
else:
# this at least stops a 500 server error - seems to occur when
# DB contains disconnected faces with no locn data - BUG: 87
face.locn = [ 0,0,0,0 ]
st.SetMessage( f"For some reason this face does not have a locn: face_id={face.id} tell ddp", "warning" )
eids=eids.rstrip(",")
# jic, sometimes we trip this, and rather than show broken pages / destroy