Skip to content

Comments

Fix: Handle invalid attendance timestamp (day out of range for month)#241

Closed
rafiqul-altersense wants to merge 1 commit intofananimi:masterfrom
rafiqul-altersense:master
Closed

Fix: Handle invalid attendance timestamp (day out of range for month)#241
rafiqul-altersense wants to merge 1 commit intofananimi:masterfrom
rafiqul-altersense:master

Conversation

@rafiqul-altersense
Copy link

This update fixes a ValueError caused by invalid date values returned from the biometric device. The error occurred in zk.base.get_attendance() when trying to decode timestamps where the day value exceeded the valid range for a given month. A safeguard has been added to prevent this issue by validating or skipping malformed timestamps, ensuring the sync process doesn't crash.

@daiduongnguyen-odoo
Copy link

Why change something that not worth to change (eg code format), if i'm a reviewer i will never merge this

@rafiqul-altersense
Copy link
Author

Why change something that not worth to change (eg code format), if i'm a reviewer i will never merge this

Sorry about that—my IDE auto-formatted the code. I've created a new pull request; please have a look.

#242

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.

2 participants