-
Notifications
You must be signed in to change notification settings - Fork 265
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
DRF models.DurationField warning #78
Comments
congratulations on finding probably the last missing field. i guess it got past me because it has not direct mapping in easy fix |
thx. I try.
should that omission be raised upstream? fwiw, I am happy to do a bunch of these easy fixes so you can focus on that harder ones. |
i found that it is not in the list but appended later. so no upstream issue. sure thing. thanks. |
@jayvdb could have added a regex for. that would have been the cherry on top but plain string should do it also. please close on fix confirmation. |
Plain string is good enough; can always revisit later. Much appreciated. |
Describe the bug
DRF DurationField is a string, but is showing a warning.
Warning #35: could not resolve serializer field DurationField(). defaulting to "string"
https://github.com/encode/django-rest-framework/blob/aed7496/rest_framework/fields.py#L1363
https://github.com/django/django/blob/1f817da/django/utils/dateparse.py#L125
Expected behavior
No warnings for core DRF fields.
The text was updated successfully, but these errors were encountered: