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?
to your account
When viewing an endpoint using the Admin renderer, cases where the integer 1 or 0 should be displayed, such as object ids and foreign keys, instead display the corresponding True or False value..
The text was updated successfully, but these errors were encountered:
That seems to be because of this in the format_value template filter.
>>> 1 in (True, False, None)
Sorry, something went wrong.
Looks like that should be changed to something like
if isinstance(value, bool) or value is None:
Or slightly more to the point:
from types import NoneType
if isinstance(value, (bool, NoneType)):
No branches or pull requests