first pass at keeping overrides on face delete - should at least stop code crashing if you try to delete faces from DB and they still had a matching override
This commit is contained in:
@@ -348,7 +348,7 @@ def override_force_match():
|
||||
if not f:
|
||||
raise Exception("could not find face to add override for!")
|
||||
|
||||
mo = FaceManualOverride( face_id=f.id, face=f.face, person_id=p.id )
|
||||
mo = FaceManualOverride( face_id=f.id, person_id=p.id )
|
||||
db.session.add( mo )
|
||||
db.session.commit()
|
||||
|
||||
@@ -410,7 +410,7 @@ def add_no_match_override():
|
||||
if not t:
|
||||
raise Exception("could not find override_type to add override for!")
|
||||
|
||||
nmo = FaceNoMatchOverride( face_id=f.id, face=f.face, type_id=t.id )
|
||||
nmo = FaceNoMatchOverride( face_id=f.id, type_id=t.id )
|
||||
db.session.add( nmo )
|
||||
db.session.commit()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user