fixed BUG-86 - last places changed from locn to tmp_locn
This commit is contained in:
1
BUGs
1
BUGs
@@ -1,7 +1,6 @@
|
|||||||
### Next: 88
|
### Next: 88
|
||||||
BUG-60: entries per page in flat view will get how_many from each top-level dir in PATH - causes viewer to get lost in eids for last_eid
|
BUG-60: entries per page in flat view will get how_many from each top-level dir in PATH - causes viewer to get lost in eids for last_eid
|
||||||
BUG-85: once we rebuild data from scratch, need to reset just clean out pa_user_state's
|
BUG-85: once we rebuild data from scratch, need to reset just clean out pa_user_state's
|
||||||
BUG-86: had some face locn data be in { } not [ ] again -- I think we need to stop using locn in the DB and instead use a tmp_locn or something else -- no way to touch the DB data then
|
|
||||||
BUG-87: using Person->show matches->then view an image shows bug in viewer with msising data in json -- that same image via a filename search works...
|
BUG-87: using Person->show matches->then view an image shows bug in viewer with msising data in json -- that same image via a filename search works...
|
||||||
-- seems some faces have an empty locn, but do have a w and h... (ORM - tmp_locn vs locn???)
|
-- seems some faces have an empty locn, but do have a w and h... (ORM - tmp_locn vs locn???)
|
||||||
# select id, locn, w, h from face where locn is null;
|
# select id, locn, w, h from face where locn is null;
|
||||||
|
|||||||
5
files.py
5
files.py
@@ -666,6 +666,7 @@ def viewlist():
|
|||||||
resp['objs'][e.id]['name'] = e.name
|
resp['objs'][e.id]['name'] = e.name
|
||||||
resp['objs'][e.id]['type'] = e.type.name
|
resp['objs'][e.id]['type'] = e.type.name
|
||||||
if e.file_details.faces:
|
if e.file_details.faces:
|
||||||
|
# model is used for whole file, so set it at that level (based on first face)
|
||||||
resp['objs'][e.id]['face_model'] = e.file_details.faces[0].facefile_lnk.model_used
|
resp['objs'][e.id]['face_model'] = e.file_details.faces[0].facefile_lnk.model_used
|
||||||
resp['objs'][e.id]['faces'] = []
|
resp['objs'][e.id]['faces'] = []
|
||||||
|
|
||||||
@@ -724,11 +725,11 @@ def view(id):
|
|||||||
# put locn data back into array format
|
# put locn data back into array format
|
||||||
for face in e.file_details.faces:
|
for face in e.file_details.faces:
|
||||||
if face.locn:
|
if face.locn:
|
||||||
face.locn = json.loads(face.locn)
|
face.tmp_locn = json.loads(face.locn)
|
||||||
else:
|
else:
|
||||||
# this at least stops a 500 server error - seems to occur when
|
# this at least stops a 500 server error - seems to occur when
|
||||||
# DB contains disconnected faces with no locn data - BUG: 87
|
# DB contains disconnected faces with no locn data - BUG: 87
|
||||||
face.locn = [ 0,0,0,0 ]
|
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" )
|
st.SetMessage( f"For some reason this face does not have a locn: face_id={face.id} tell ddp", "warning" )
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -41,8 +41,8 @@
|
|||||||
{% for face in objs[id].file_details.faces %}
|
{% for face in objs[id].file_details.faces %}
|
||||||
data = {
|
data = {
|
||||||
'id': '{{face.id}}',
|
'id': '{{face.id}}',
|
||||||
'x': '{{face.locn[3]}}', 'y': '{{face.locn[0]}}',
|
'x': '{{face.tmp_locn[3]}}', 'y': '{{face.tmp_locn[0]}}',
|
||||||
'w': '{{face.locn[1]-face.locn[3]}}', 'h':'{{face.locn[2]-face.locn[0]}}'
|
'w': '{{face.tmp_locn[1]-face.tmp_locn[3]}}', 'h':'{{face.tmp_locn[2]-face.tmp_locn[0]}}'
|
||||||
}
|
}
|
||||||
{% if face.refimg %}
|
{% if face.refimg %}
|
||||||
data['who']='{{face.refimg.person.tag}}'
|
data['who']='{{face.refimg.person.tag}}'
|
||||||
|
|||||||
Reference in New Issue
Block a user