fixed bug when get of a view is for a non-search, now that I have added search to pa_user_state ORM query

This commit is contained in:
2022-02-03 21:16:51 +11:00
parent e1a6348967
commit e16f7dbc30
2 changed files with 10 additions and 11 deletions

14
TODO
View File

@@ -1,14 +1,8 @@
## GENERAL
* faces less than 43 pixels are all false matches, so lets add this to settings and "auto-ignore" all faces < 43 pixels
* [DONE] order/ find face with largest size and at least show that as unmatched
- could also try to check it vs. other faces, if it matches more than say 10? we offer it up as a required ref img, then cut that face (with margin) out and use it is a new ref image / person
* on viewer: allow face to be used to create person, add to existing person, and allow 'ignore', mark as 'not a face', etc. -> all into DB
- so need face 'treatment' -> could be matched via face_refimg_link, but also could be 'ignore' or 'not a face', in each case we could exclude those faces from
matching for the future, and reporting on matches, etc.
- context-menu with rects on a canvas
https://stackoverflow.com/questions/31601393/create-context-menu-using-jquery-with-html-5-canvas
- also allow joblog search from the viewer for that file...
* on viewer:
- allow face to be used to create person, add to existing person, and allow 'ignore', mark as 'not a face', etc
-> ignore/not a face/too young --> all need to go into DB so we can remember the 'override' when we re-ai-match
- allow joblog search from the viewer for that file...
* should allow right-click from View menu (particularly useful on search) to show other files around this one by date (maybe that folder or something?)

View File

@@ -83,8 +83,13 @@ class States(PA):
# GET's occur on redirect, and we don't have a form, so get it from pref
st=self.url[8:]
ref=request.referrer
st=re.sub( '.+/search/', '', ref )
if 'search' in ref:
st=re.sub( '.+/search/', '', ref )
else:
st=''
pref=PA_UserState.query.filter(PA_UserState.pa_user_dn==current_user.dn,PA_UserState.path_type==self.path_type,PA_UserState.view_eid==self.view_eid,PA_UserState.orig_search_term==st).first()
if not pref:
print( f"pref not found dn={current_user.dn}, st={st}, s={self}????" )
self.url = pref.orig_url
if 'files_ip' in self.url or 'file_list_ip' in self.url: