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

Disallow str in dates (AnyDate) #17

Open
lainets opened this issue Jul 4, 2022 · 0 comments
Open

Disallow str in dates (AnyDate) #17

lainets opened this issue Jul 4, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@lainets
Copy link
Contributor

lainets commented Jul 4, 2022

gitmanager/access/course.py

Lines 325 to 327 in ba22bed

AnyDate = Union[datetime, date, str]
# FIXME: str in AnyDate passes invalid dates and any strings.
# str should be removed. However, removing it causes crashes with the Undefined type.
should not allow str, as said in the comment. Not sure when the Undefined type issue occurs as removing the str didn't cause any crashes for me.

Invalid dates can be passed to A+ as long as the str exists. Fortunately, the issue is noticed by A+ but the error message will be much less clear when reported by A+ instead of Git Manager.

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

No branches or pull requests

2 participants