Re: [Django] #35198: Facet filters crash for queryset with no ID.

21 views
Skip to first unread message

Django

unread,
Feb 16, 2024, 12:52:29 PM2/16/24
to django-...@googlegroups.com
#35198: Facet filters crash for queryset with no ID.
-------------------------------------+-------------------------------------
Reporter: Simon Alef | Owner: Shafiya
| Adzhani
Type: Bug | Status: assigned
Component: contrib.admin | Version: 5.0
Severity: Release blocker | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Shafiya Adzhani):

* owner: nobody => Shafiya Adzhani
* status: new => assigned

--
Ticket URL: <https://code.djangoproject.com/ticket/35198#comment:3>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Feb 17, 2024, 1:01:43 AM2/17/24
to django-...@googlegroups.com
#35198: Facet filters crash for queryset with no ID.
-------------------------------------+-------------------------------------
Reporter: Simon Alef | Owner: Shafiya
| Adzhani
Type: Bug | Status: assigned
Component: contrib.admin | Version: 5.0
Severity: Release blocker | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Shafiya Adzhani):

* Attachment "screenshot-related-list-filter.png" added.

Screenshot of Related List Filter on reported apps
--
Ticket URL: <https://code.djangoproject.com/ticket/35198>

Django

unread,
Feb 17, 2024, 1:05:13 AM2/17/24
to django-...@googlegroups.com
#35198: Facet filters crash for queryset with no ID.
-------------------------------------+-------------------------------------
Reporter: Simon Alef | Owner: Shafiya
| Adzhani
Type: Bug | Status: assigned
Component: contrib.admin | Version: 5.0
Severity: Release blocker | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Shafiya Adzhani):

Replying to [ticket:35198 Simon Alef]:
> Description:
> Our Django application defines a relational model where Customer
entities have a one-to-many relationship with Contracts, and Contract
entities have a one-to-many relationship with Rental Items. A custom admin
filter (RentalItemsFilter) was implemented on the Customer model to enable
filtering based on the presence of active Rental Items.
>
> Issue:
> Using the "show counts" feature within the RentalItemsFilter on the
Customer admin page to display counts of devices (Rental Items) associated
with each customer through contracts triggers an exception.
>
> Steps to Reproduce:
> Load fixtures from fixture.json
> Go to the Django admin dashboard and navigate to the Customer model
section.
> Click on "Show counts".
>
>
>
> {{{
> Traceback:
> Request Method: GET
> Request URL: http://127.0.0.1:8000/admin/demo/customer/?_facets=True
>
> Django Version: 5.0.2
> Python Version: 3.11.7
> Installed Applications:
> ['django.contrib.admin',
> 'django.contrib.auth',
> 'django.contrib.contenttypes',
> 'django.contrib.sessions',
> 'django.contrib.messages',
> 'django.contrib.staticfiles',
> 'demo']
> Installed Middleware:
> ['django.middleware.security.SecurityMiddleware',
> 'django.contrib.sessions.middleware.SessionMiddleware',
> 'django.middleware.common.CommonMiddleware',
> 'django.middleware.csrf.CsrfViewMiddleware',
> 'django.contrib.auth.middleware.AuthenticationMiddleware',
> 'django.contrib.messages.middleware.MessageMiddleware',
> 'django.middleware.clickjacking.XFrameOptionsMiddleware']
>
>
> Template error:
> In template /django_bug_report/.venv/lib/python3.11/site-
packages/django/contrib/admin/templates/admin/change_list.html, error at
line 87
> no such column: demo_rentalitem.id
> 77 : <h2>{% translate 'Filter' %}</h2>
> 78 : {% if cl.is_facets_optional or cl.has_active_filters
%}<div id="changelist-filter-extra-actions">
> 79 : {% if cl.is_facets_optional %}<h3>
> 80 : {% if cl.add_facets %}<a href="{{
cl.remove_facet_link }}" class="hidelink">{% translate "Hide counts"
%}</a>
> 81 : {% else %}<a href="{{ cl.add_facet_link }}"
class="viewlink">{% translate "Show counts" %}</a>{% endif %}
> 82 : </h3>{% endif %}
> 83 : {% if cl.has_active_filters %}<h3>
> 84 : <a href="{{ cl.clear_all_filters_qs }}">&#10006;
{% translate "Clear all filters" %}</a>
> 85 : </h3>{% endif %}
> 86 : </div>{% endif %}
> 87 : {% for spec in cl.filter_specs %} {%
admin_list_filter cl spec %} {% endfor %}
> 88 : </div>
> 89 : {% endif %}
> 90 : {% endblock %}
> 91 : </div>
> 92 : </div>
> 93 : {% endblock %}
> 94 :
>
> Traceback (most recent call last):
> File "/django_bug_report/.venv/lib/python3.11/site-
packages/django/db/backends/utils.py", line 105, in _execute
> return self.cursor.execute(sql, params)
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> File "/django_bug_report/.venv/lib/python3.11/site-
packages/django/db/backends/sqlite3/base.py", line 329, in execute
> return super().execute(query, params)
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>
> The above exception (no such column: demo_rentalitem.id) was the direct
cause of the following exception:
> File "/django_bug_report/.venv/lib/python3.11/site-
packages/django/core/handlers/exception.py", line 55, in inner
> response = get_response(request)
> ^^^^^^^^^^^^^^^^^^^^^
> File "/django_bug_report/.venv/lib/python3.11/site-
packages/django/core/handlers/base.py", line 220, in _get_response
> response = response.render()
> ^^^^^^^^^^^^^^^^^
> File "/django_bug_report/.venv/lib/python3.11/site-
packages/django/template/response.py", line 114, in render
> self.content = self.rendered_content
> ^^^^^^^^^^^^^^^^^^^^^
> File "/django_bug_report/.venv/lib/python3.11/site-
packages/django/template/response.py", line 92, in rendered_content
> return template.render(context, self._request)
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> File "/django_bug_report/.venv/lib/python3.11/site-
packages/django/template/backends/django.py", line 61, in render
> return self.template.render(context)
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> File "/django_bug_report/.venv/lib/python3.11/site-
packages/django/template/base.py", line 171, in render
> return self._render(context)
> ^^^^^^^^^^^^^^^^^^^^^
> File "/django_bug_report/.venv/lib/python3.11/site-
packages/django/template/base.py", line 163, in _render
> return self.nodelist.render(context)
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> File "/django_bug_report/.venv/lib/python3.11/site-
packages/django/template/base.py", line 1000, in render
> return SafeString("".join([node.render_annotated(context) for node
in self]))
>
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> File "/django_bug_report/.venv/lib/python3.11/site-
packages/django/template/base.py", line 1000, in <listcomp>
> return SafeString("".join([node.render_annotated(context) for node
in self]))
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> File "/django_bug_report/.venv/lib/python3.11/site-
packages/django/template/base.py", line 961, in render_annotated
> return self.render(context)
> ^^^^^^^^^^^^^^^^^^^^
> File "/django_bug_report/.venv/lib/python3.11/site-
packages/django/template/loader_tags.py", line 159, in render
> return compiled_parent._render(context)
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> File "/django_bug_report/.venv/lib/python3.11/site-
packages/django/template/base.py", line 163, in _render
> return self.nodelist.render(context)
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> File "/django_bug_report/.venv/lib/python3.11/site-
packages/django/template/base.py", line 1000, in render
> return SafeString("".join([node.render_annotated(context) for node
in self]))
>
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> File "/django_bug_report/.venv/lib/python3.11/site-
packages/django/template/base.py", line 1000, in <listcomp>
> return SafeString("".join([node.render_annotated(context) for node
in self]))
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> File "/django_bug_report/.venv/lib/python3.11/site-
packages/django/template/base.py", line 961, in render_annotated
> return self.render(context)
> ^^^^^^^^^^^^^^^^^^^^
> File "/django_bug_report/.venv/lib/python3.11/site-
packages/django/template/loader_tags.py", line 159, in render
> return compiled_parent._render(context)
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> File "/django_bug_report/.venv/lib/python3.11/site-
packages/django/template/base.py", line 163, in _render
> return self.nodelist.render(context)
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> File "/django_bug_report/.venv/lib/python3.11/site-
packages/django/template/base.py", line 1000, in render
> return SafeString("".join([node.render_annotated(context) for node
in self]))
>
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> File "/django_bug_report/.venv/lib/python3.11/site-
packages/django/template/base.py", line 1000, in <listcomp>
> return SafeString("".join([node.render_annotated(context) for node
in self]))
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> File "/django_bug_report/.venv/lib/python3.11/site-
packages/django/template/base.py", line 961, in render_annotated
> return self.render(context)
> ^^^^^^^^^^^^^^^^^^^^
> File "/django_bug_report/.venv/lib/python3.11/site-
packages/django/template/loader_tags.py", line 65, in render
> result = block.nodelist.render(context)
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> File "/django_bug_report/.venv/lib/python3.11/site-
packages/django/template/base.py", line 1000, in render
> return SafeString("".join([node.render_annotated(context) for node
in self]))
>
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> File "/django_bug_report/.venv/lib/python3.11/site-
packages/django/template/base.py", line 1000, in <listcomp>
> return SafeString("".join([node.render_annotated(context) for node
in self]))
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> File "/django_bug_report/.venv/lib/python3.11/site-
packages/django/template/base.py", line 961, in render_annotated
> return self.render(context)
> ^^^^^^^^^^^^^^^^^^^^
> File "/django_bug_report/.venv/lib/python3.11/site-
packages/django/template/loader_tags.py", line 65, in render
> result = block.nodelist.render(context)
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> File "/django_bug_report/.venv/lib/python3.11/site-
packages/django/template/base.py", line 1000, in render
> return SafeString("".join([node.render_annotated(context) for node
in self]))
>
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> File "/django_bug_report/.venv/lib/python3.11/site-
packages/django/template/base.py", line 1000, in <listcomp>
> return SafeString("".join([node.render_annotated(context) for node
in self]))
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> File "/django_bug_report/.venv/lib/python3.11/site-
packages/django/template/base.py", line 961, in render_annotated
> return self.render(context)
> ^^^^^^^^^^^^^^^^^^^^
> File "/django_bug_report/.venv/lib/python3.11/site-
packages/django/template/defaulttags.py", line 326, in render
> return nodelist.render(context)
> ^^^^^^^^^^^^^^^^^^^^^^^^
> File "/django_bug_report/.venv/lib/python3.11/site-
packages/django/template/base.py", line 1000, in render
> return SafeString("".join([node.render_annotated(context) for node
in self]))
>
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> File "/django_bug_report/.venv/lib/python3.11/site-
packages/django/template/base.py", line 1000, in <listcomp>
> return SafeString("".join([node.render_annotated(context) for node
in self]))
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> File "/django_bug_report/.venv/lib/python3.11/site-
packages/django/template/base.py", line 961, in render_annotated
> return self.render(context)
> ^^^^^^^^^^^^^^^^^^^^
> File "/django_bug_report/.venv/lib/python3.11/site-
packages/django/template/defaulttags.py", line 242, in render
> nodelist.append(node.render_annotated(context))
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> File "/django_bug_report/.venv/lib/python3.11/site-
packages/django/template/base.py", line 961, in render_annotated
> return self.render(context)
> ^^^^^^^^^^^^^^^^^^^^
> File "/django_bug_report/.venv/lib/python3.11/site-
packages/django/template/library.py", line 237, in render
> output = self.func(*resolved_args, **resolved_kwargs)
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> File "/django_bug_report/.venv/lib/python3.11/site-
packages/django/contrib/admin/templatetags/admin_list.py", line 505, in
admin_list_filter
> "choices": list(spec.choices(cl)),
> ^^^^^^^^^^^^^^^^^^^^^^
> File "/django_bug_report/.venv/lib/python3.11/site-
packages/django/contrib/admin/filters.py", line 150, in choices
> facet_counts = self.get_facet_queryset(changelist) if add_facets
else None
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> File "/django_bug_report/.venv/lib/python3.11/site-
packages/django/contrib/admin/filters.py", line 87, in get_facet_queryset
> return filtered_qs.aggregate(
>
> File "/django_bug_report/.venv/lib/python3.11/site-
packages/django/db/models/query.py", line 604, in aggregate
> return self.query.chain().get_aggregation(self.db, kwargs)
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> File "/django_bug_report/.venv/lib/python3.11/site-
packages/django/db/models/sql/query.py", line 615, in get_aggregation
> result = compiler.execute_sql(SINGLE)
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> File "/django_bug_report/.venv/lib/python3.11/site-
packages/django/db/models/sql/compiler.py", line 1562, in execute_sql
> cursor.execute(sql, params)
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^
> File "/django_bug_report/.venv/lib/python3.11/site-
packages/django/db/backends/utils.py", line 122, in execute
> return super().execute(sql, params)
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> File "/django_bug_report/.venv/lib/python3.11/site-
packages/django/db/backends/utils.py", line 79, in execute
> return self._execute_with_wrappers(
>
> File "/django_bug_report/.venv/lib/python3.11/site-
packages/django/db/backends/utils.py", line 92, in _execute_with_wrappers
> return executor(sql, params, many, context)
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> File "/django_bug_report/.venv/lib/python3.11/site-
packages/django/db/backends/utils.py", line 100, in _execute
> with self.db.wrap_database_errors:
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> File "/django_bug_report/.venv/lib/python3.11/site-
packages/django/db/utils.py", line 91, in __exit__
> raise dj_exc_value.with_traceback(traceback) from exc_value
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> File "/django_bug_report/.venv/lib/python3.11/site-
packages/django/db/backends/utils.py", line 105, in _execute
> return self.cursor.execute(sql, params)
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> File "/django_bug_report/.venv/lib/python3.11/site-
packages/django/db/backends/sqlite3/base.py", line 329, in execute
> return super().execute(query, params)
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>
> Exception Type: OperationalError at /admin/demo/customer/
> Exception Value: no such column: demo_rentalitem.id
>
> }}}

Based on the image I attached above, I'm wondering if this behavior is as
expected? If so, instead of using SimpleListFilter, it used
RelatedFieldListFilter.
--
Ticket URL: <https://code.djangoproject.com/ticket/35198#comment:4>

Django

unread,
Feb 17, 2024, 6:34:40 AM2/17/24
to django-...@googlegroups.com
#35198: Facet filters crash for queryset with no ID.
-------------------------------------+-------------------------------------
Reporter: Simon Alef | Owner: Shafiya
| Adzhani
Type: Bug | Status: assigned
Component: contrib.admin | Version: 5.0
Severity: Release blocker | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Thomas Feldmann):

Hey, thanks a lot for tackling this! You're right, for this reproducer a
RelatedFieldListFilter would be the way to go.
For the reproducer we stripped some business logic where we are annotating
and filtering on the queryset, so I think we have to go with subclassing a
SimpleListFilter here.
--
Ticket URL: <https://code.djangoproject.com/ticket/35198#comment:5>

Django

unread,
Feb 17, 2024, 8:41:22 AM2/17/24
to django-...@googlegroups.com
#35198: Facet filters crash for queryset with no ID.
-------------------------------------+-------------------------------------
Reporter: Simon Alef | Owner: Shafiya
| Adzhani
Type: Bug | Status: assigned
Component: contrib.admin | Version: 5.0
Severity: Release blocker | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Shafiya Adzhani):

Replying to [comment:5 Thomas Feldmann]:
> Hey, thanks a lot for tackling this! You're right, for this reproducer a
RelatedFieldListFilter would be the way to go.
> For the reproducer we stripped some business logic where we are
annotating and filtering on the queryset, so I think we have to go with
subclassing a SimpleListFilter here.

ah, I understand. After I look at the reproducer, this reproducer intended
to make categories like "ACTIVE" and "-" (not defined, data that are not
in "ACTIVE"), right?
--
Ticket URL: <https://code.djangoproject.com/ticket/35198#comment:6>

Django

unread,
Feb 18, 2024, 5:42:05 AM2/18/24
to django-...@googlegroups.com
#35198: Facet filters crash for queryset with no ID.
-------------------------------------+-------------------------------------
Reporter: Simon Alef | Owner: Shafiya
| Adzhani
Type: Bug | Status: assigned
Component: contrib.admin | Version: 5.0
Severity: Release blocker | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Thomas Feldmann):

Yes, kind of. The full filter is something like this:


{{{#!python
class RentalItemsFilter(admin.SimpleListFilter):
title = "State"
parameter_name = "rental_items_state"

def lookups(self, request, model_admin):
return [
("ACTIVE", "Active"),
("CANCELLED", "Cancelled"),
]

def queryset(self, request, queryset):
if not self.value():
return queryset

queryset = queryset.annotate(
active_rental_item_count=Count(
"contracts__rental_items",
filter=Q(contracts__rental_items__cancel_date__isnull=True),
distinct=True,
),
cancelled_rental_item_count=Count(
"contracts__rental_items",
filter=Q(contracts__rental_items__cancel_date__isnull=False),
distinct=True,
),
)
match self.value():
case "ACTIVE":
return queryset.filter(
active_rental_item_count__gt=0,
cancelled_rental_item_count=0
)
case "CANCELLED":
return queryset.filter(
active_rental_item_count=0,
cancelled_rental_item_count__gt=0
)
case _:
raise ValueError(f"Unknown value {self.value()}")
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/35198#comment:7>

Django

unread,
Feb 19, 2024, 11:28:05 AM2/19/24
to django-...@googlegroups.com
#35198: Facet filters crash for queryset with no ID.
-------------------------------------+-------------------------------------
Reporter: Simon Alef | Owner: Shafiya
| Adzhani
Type: Bug | Status: assigned
Component: contrib.admin | Version: 5.0
Severity: Release blocker | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Shafiya Adzhani):

* has_patch: 0 => 1

Comment:

Here is the PR: https://github.com/django/django/pull/17880
--
Ticket URL: <https://code.djangoproject.com/ticket/35198#comment:8>

Django

unread,
Feb 27, 2024, 3:37:51 AM2/27/24
to django-...@googlegroups.com
#35198: Facet filters crash for queryset with no ID.
-------------------------------------+-------------------------------------
Reporter: Simon Alef | Owner: Shafiya
| Adzhani
Type: Bug | Status: assigned
Component: contrib.admin | Version: 5.0
Severity: Release blocker | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Sarah Boyce):

* needs_better_patch: 0 => 1

--
Ticket URL: <https://code.djangoproject.com/ticket/35198#comment:9>

Django

unread,
Feb 29, 2024, 3:28:27 AM2/29/24
to django-...@googlegroups.com
#35198: Facet filters crash for queryset with no ID.
-------------------------------------+-------------------------------------
Reporter: Simon Alef | Owner: Shafiya
| Adzhani
Type: Bug | Status: assigned
Component: contrib.admin | Version: 5.0
Severity: Release blocker | Resolution:
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

* needs_better_patch: 1 => 0
* stage: Accepted => Ready for checkin

--
Ticket URL: <https://code.djangoproject.com/ticket/35198#comment:10>

Django

unread,
Feb 29, 2024, 4:37:45 AM2/29/24
to django-...@googlegroups.com
#35198: Facet filters crash for queryset with no ID.
-------------------------------------+-------------------------------------
Reporter: Simon Alef | Owner: Shafiya
| Adzhani
Type: Bug | Status: closed
Component: contrib.admin | Version: 5.0
Severity: Release blocker | Resolution: fixed
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak <felisiak.mariusz@…>):

* resolution: => fixed
* status: assigned => closed

Comment:

In [changeset:"a738281265bba5d00711ab62d4d37923764a27eb" a7382812]:
{{{#!CommitTicketReference repository=""
revision="a738281265bba5d00711ab62d4d37923764a27eb"
Fixed #35198 -- Fixed facet filters crash on querysets with no primary
key.

Thanks Simon Alef for the report.

Regression in 868e2fcddae6720d5713924a785339d1665f1bb9.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/35198#comment:11>

Django

unread,
Feb 29, 2024, 4:37:50 AM2/29/24
to django-...@googlegroups.com
#35198: Facet filters crash for queryset with no ID.
-------------------------------------+-------------------------------------
Reporter: Simon Alef | Owner: Shafiya
| Adzhani
Type: Bug | Status: closed
Component: contrib.admin | Version: 5.0
Severity: Release blocker | Resolution: fixed
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Mariusz Felisiak <felisiak.mariusz@…>):

In [changeset:"80761c3b01fbbbe2da1761937edd20251a86fbee" 80761c3b]:
{{{#!CommitTicketReference repository=""
revision="80761c3b01fbbbe2da1761937edd20251a86fbee"
[5.0.x] Fixed #35198 -- Fixed facet filters crash on querysets with no
primary key.

Thanks Simon Alef for the report.

Regression in 868e2fcddae6720d5713924a785339d1665f1bb9.

Backport of a738281265bba5d00711ab62d4d37923764a27eb from main
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/35198#comment:12>

Django

unread,
Mar 7, 2024, 12:54:24 PM3/7/24
to django-...@googlegroups.com
#35198: Facet filters crash for queryset with no ID.
-------------------------------------+-------------------------------------
Reporter: Simon Alef | Owner: Shafiya
| Adzhani
Type: Bug | Status: closed
Component: contrib.admin | Version: 5.0
Severity: Release blocker | Resolution: fixed
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Natalia Bidart):

#35282 was a duplicate of this one.
--
Ticket URL: <https://code.djangoproject.com/ticket/35198#comment:13>
Reply all
Reply to author
Forward
0 new messages