all override add and remove now use new datastructures, close to be able to test / augment as per TODO
This commit is contained in:
14
person.py
14
person.py
@@ -385,7 +385,9 @@ def add_force_match_override():
|
||||
NewJob( "metadata", num_files=0, wait_for=None, jex=jex, desc="create metadata for adding forced match" )
|
||||
|
||||
# this will reply to the Ajax / POST, and cause the page to re-draw with new face override to person_tag
|
||||
return make_response( jsonify( person_tag=p.tag ) )
|
||||
person_schema = PersonSchema(many=False)
|
||||
p_data = person_schema.dump(p)
|
||||
return make_response( jsonify( person=p_data ) )
|
||||
|
||||
################################################################################
|
||||
# /remove_force_match_override -> POST
|
||||
@@ -436,6 +438,11 @@ def remove_no_match_override():
|
||||
return make_response( jsonify( face_id=face_id ) )
|
||||
|
||||
|
||||
class FaceOverrideTypeSchema(ma.SQLAlchemyAutoSchema):
|
||||
class Meta:
|
||||
model = FaceOverrideType
|
||||
load_instance = True
|
||||
|
||||
################################################################################
|
||||
# /add_no_match_override -> POST
|
||||
################################################################################
|
||||
@@ -463,5 +470,6 @@ def add_no_match_override():
|
||||
# dont do status update here, the F/E is in the middle of a dbox, just send metadata through to the B/E
|
||||
NewJob( "metadata", num_files=0, wait_for=None, jex=jex, desc="create metadata for adding forced non-match" )
|
||||
|
||||
# this will reply to the Ajax / POST, and cause the page to re-draw with new face override to person_tag
|
||||
return make_response( jsonify( type=t.name ) )
|
||||
fot_schema = FaceOverrideTypeSchema(many=False)
|
||||
t_data=fot_schema.dump(t)
|
||||
return make_response( jsonify( type_id=t.id, type=t_data ) )
|
||||
|
||||
Reference in New Issue
Block a user