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

ValueError when using level 0 interval in Django field #34

Open
jmiguelv opened this issue Aug 12, 2020 · 0 comments
Open

ValueError when using level 0 interval in Django field #34

jmiguelv opened this issue Aug 12, 2020 · 0 comments

Comments

@jmiguelv
Copy link

EDTF is throwing a ValueError exception when saving an EDTF field in Django when using a level 0 interval date, for example 1792-04-20/1802-03-27:

File "/usr/local/lib/python3.7/site-packages/edtf/fields.py" in pre_save
100. edtf = text_to_edtf(natural_text)

File "/usr/local/lib/python3.7/site-packages/edtf/natlang/en.py" in text_to_edtf
37. result = text_to_edtf_date(t)

File "/usr/local/lib/python3.7/site-packages/edtf/natlang/en.py" in text_to_edtf_date
209. date1 = dt1.isoformat()[:10]

Exception Type: ValueError at /admin/utils/date/3794/change/
Exception Value: offset must be a timedelta strictly between -timedelta(hours=24) and timedelta(hours=24).

Has anyone seen this issue before?

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

No branches or pull requests

1 participant