diff --git a/files.py b/files.py index 4aa914b..d8d24b9 100644 --- a/files.py +++ b/files.py @@ -664,13 +664,11 @@ def viewlist(): # put locn data back into array format fid=0 for face in e.file_details.faces: - fix_face_locn(face) - tmp_locn = json.loads(face.locn) fd= {} - fd['x'] = tmp_locn[3] - fd['y'] = tmp_locn[0] - fd['w'] = tmp_locn[1]-tmp_locn[3] - fd['h'] = tmp_locn[2]-tmp_locn[0] + fd['x'] = face.face_left + fd['y'] = face.face_top + fd['w'] = face.w + fd['h'] = face.h if face.refimg: fd['who'] = face.refimg.person.tag fd['distance'] = round(face.refimg_lnk.face_distance,2) @@ -716,14 +714,6 @@ def view(id): continue # put locn data back into array format for face in e.file_details.faces: - if face.locn: - fix_face_locn(face) - face.tmp_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.tmp_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" ) # now get any relevant override and store it in objs... fnmo = FaceNoMatchOverride.query.filter(FaceNoMatchOverride.face_id==face.id).first() if fnmo: @@ -733,7 +723,6 @@ def view(id): mo.type = FaceOverrideType.query.filter( FaceOverrideType.name== 'Manual match to existing person' ).first() face.manual_override=mo - eids=eids.rstrip(",") # jic, sometimes we trip this, and rather than show broken pages / destroy # face locn data, just warn & redirect