Skip to content
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

validateAuditPeriod should lookup proper AuditPeriod even if year and half are not given #34

Open
Byunk opened this issue Feb 7, 2024 · 0 comments · May be fixed by #35
Open

validateAuditPeriod should lookup proper AuditPeriod even if year and half are not given #34

Byunk opened this issue Feb 7, 2024 · 0 comments · May be fixed by #35
Assignees
Labels
bug Something isn't working

Comments

@Byunk
Copy link
Collaborator

Byunk commented Feb 7, 2024

Currently, validateAuditPeriod throws an error if request does not contain year and half values. The reason why those unnecessaries is needed is querying AuditPeriod is based on given year and half.

According to requirement, however, it is enough to figure out the latest AuditPeriod to validate whether the request is overdue or not.

// validateAuditPeriod
1. filter audit period if its `start` date is lower than timestamp
2. filter audit period if its `end` date is bigger than timestamp
3. return true if audit period exists, else throw an ValidationError
@Byunk Byunk added the bug Something isn't working label Feb 7, 2024
@Byunk Byunk self-assigned this Feb 13, 2024
@yym0329 yym0329 linked a pull request Feb 18, 2024 that will close this issue
@Byunk Byunk assigned yym0329 and unassigned Byunk Feb 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants