-
Notifications
You must be signed in to change notification settings - Fork 431
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
Adjust "null" to expected behavior #521
Conversation
Add "not" to ensure that when null is True (making ` None or '' ` distinct from False) that the default placeholder (--) is rendered
@kalzoo your change make 4 tests fail. Can you have a look at that? |
@jieter, all four appear to assert the behavior that I believe is unexpected. I think it's just a semantic thing, but I would expect:
However, the opposite expectation is reflected in your tests, for example (
In my mind, "none different than false" should mean Edit re: ORM |
@kalzoo thanks for fixing the tests, however, this is a breaking change and this PR provides no deprecation path. Since this is just an issue of expectation, can we maybe also adjust the documentation (docstring) to make sure future expectations are correctly created? |
True. Seemed low-impact since it won't cause exceptions, only a minor difference in output. As a new user to django, this change is more intuitive to me, especially since it would make In any case, the library's great to have, thanks for your work in maintaining it. |
Thanks for your thoughts, I think I'll take this into django-tables2==2.0, refs #526 |
* Adjust "null" to expected behavior Add "not" to ensure that when null is True (making ` None or '' ` distinct from False) that the default placeholder (--) is rendered
* Adjust "null" to expected behavior Add "not" to ensure that when null is True (making ` None or '' ` distinct from False) that the default placeholder (--) is rendered
* Adjust "null" to expected behavior Add "not" to ensure that when null is True (making ` None or '' ` distinct from False) that the default placeholder (--) is rendered
* Adjust "null" to expected behavior Add "not" to ensure that when null is True (making ` None or '' ` distinct from False) that the default placeholder (--) is rendered
* Adjust "null" to expected behavior Add "not" to ensure that when null is True (making ` None or '' ` distinct from False) that the default placeholder (--) is rendered
* Adjust "null" to expected behavior Add "not" to ensure that when null is True (making ` None or '' ` distinct from False) that the default placeholder (--) is rendered
* Adjust "null" to expected behavior Add "not" to ensure that when null is True (making ` None or '' ` distinct from False) that the default placeholder (--) is rendered
* Adjust "null" to expected behavior Add "not" to ensure that when null is True (making ` None or '' ` distinct from False) that the default placeholder (--) is rendered
Add "not" to ensure that when null is True (making
None or ''
distinct from False) that the default placeholder (--) is rendered