#25320: ManyToManyField.null returns True on master (upcoming 1.9), False on
1.8.
-------------------------------------+-------------------------------------
Reporter: akaariai | Owner: nobody
Type: Bug | Status: new
Component: Database layer | Version: master
(models, ORM) |
Severity: Release blocker | Resolution:
Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by timgraham):
See the [https://github.com/django/django/pull/5202 pull request] for the
test failures. If we remove `ForeignObjectRel.null` (it isn't present in
1.8) instead of changing it to `False` as done in the PR, we'll get this
traceback:
{{{
======================================================================
ERROR: test_relatedfieldlistfilter_reverse_relationships
(admin_filters.tests.ListFiltersTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/tim/code/django/tests/admin_filters/tests.py", line 478, in
test_relatedfieldlistfilter_reverse_relationships
changelist = self.get_changelist(request, User, modeladmin)
File "/home/tim/code/django/tests/admin_filters/tests.py", line 252, in
get_changelist
modeladmin.list_select_related, modeladmin.list_per_page,
modeladmin.list_max_show_all, modeladmin.list_editable, modeladmin)
File "/home/tim/code/django/django/contrib/admin/views/main.py", line
78, in __init__
self.queryset = self.get_queryset(request)
File "/home/tim/code/django/django/contrib/admin/views/main.py", line
321, in get_queryset
filters_use_distinct) = self.get_filters(request)
File "/home/tim/code/django/django/contrib/admin/views/main.py", line
135, in get_filters
if spec and spec.has_output():
File "/home/tim/code/django/django/contrib/admin/filters.py", line 180,
in has_output
if self.field.null:
AttributeError: 'ManyToOneRel' object has no attribute 'null'
}}}
(Tom, I'll take a look at your suggestion -- composed this message and
then received your response.)
--
Ticket URL: <https://code.djangoproject.com/ticket/25320#comment:7>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/066.bb6de593b54fa7a1a3bc186fe37715ad%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.