Skip to content

Fix - Prevent Duplicate Attendance Entries#20

Open
ADP-1 wants to merge 1 commit into
yesiamrajeev:masterfrom
ADP-1:feature/auto-generate-id
Open

Fix - Prevent Duplicate Attendance Entries#20
ADP-1 wants to merge 1 commit into
yesiamrajeev:masterfrom
ADP-1:feature/auto-generate-id

Conversation

@ADP-1

@ADP-1 ADP-1 commented Oct 30, 2025

Copy link
Copy Markdown

This pull request resolves Issue #19 by fixing a bug where the same user's attendance was recorded multiple times if they remained in front of the camera.

🔧 Changes Made

  • Modified the /start route in app.py.
  • Before marking attendance, the code now fetches the list of users already present for the day.
  • The add_attendance() function is only called if the identified_person's ID is not in the existing list.

How to Test

  1. Register a new user.
  2. Click "Take Attendance."
  3. Remain in front of the camera for several seconds.
  4. Verify that your name appears only once in:
    • The attendance list on the main page.
    • The corresponding Attendance-{datetoday}.csv file.

Outcome

This change ensures data integrity by guaranteeing that each user is marked present only once per day.

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.

1 participant