-
Notifications
You must be signed in to change notification settings - Fork 55
fix(FaceDetectionMapper): Prevent inserting duplicate face detections #1318
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Signed-off-by: Marcel Klehr <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR prevents the insertion of duplicate face detections by adding a check before inserting new records. The change overrides the insert method to first query for existing face detections with the same file_id, user_id, and bounding box coordinates (x, y, height, width), returning the existing record if found instead of creating a duplicate.
- Overrides the insert method in FaceDetectionMapper to check for duplicates before insertion
- Returns existing face detection if a duplicate is found based on file_id, user_id, and coordinates
- Maintains the same return type while preventing database constraint violations or logical duplicates
c04f225 to
bfea07b
Compare
Signed-off-by: Marcel Klehr <[email protected]>
bfea07b to
c246599
Compare
Signed-off-by: Marcel Klehr <[email protected]>
|
/backport to stable10 |
|
/backport to stable9 |
|
/backport to stable8 |
fixes #1198