Skip to content

Conversation

@marcelklehr
Copy link
Member

@marcelklehr marcelklehr commented Jul 26, 2025

fixes #1198

  • Add a repair step to remove duplicates

@marcelklehr marcelklehr requested a review from Copilot July 26, 2025 09:58
Copy link
Contributor

Copilot AI left a 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

@marcelklehr marcelklehr force-pushed the fix/duplicate-face-detections branch 3 times, most recently from c04f225 to bfea07b Compare July 26, 2025 14:25
@marcelklehr marcelklehr force-pushed the fix/duplicate-face-detections branch from bfea07b to c246599 Compare July 26, 2025 14:50
@marcelklehr marcelklehr merged commit c25cc96 into main Jul 26, 2025
9 of 14 checks passed
@marcelklehr
Copy link
Member Author

/backport to stable10

@marcelklehr
Copy link
Member Author

/backport to stable9

@marcelklehr
Copy link
Member Author

/backport to stable8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Multiple instances of photos added to People after Recognize is run multiple times, people are merged or faces are added

2 participants