Opened 8 months ago
Last modified 8 months ago
#35337 closed Bug
argument of type 'NoneType' is not iterable, when show facets and change_view is overwritten in ModelAdmin — at Initial Version
Reported by: | dz | Owned by: | nobody |
---|---|---|---|
Component: | contrib.admin | Version: | 5.0 |
Severity: | Normal | Keywords: | |
Cc: | dz | Triage Stage: | Unreviewed |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Hello,
Django==5.0.3
@admin.register(LicitacionItem) class LicitacionItemAdmin(admin.ModelAdmin): list_select_related = ('licitacion', 'categoria', 'proveedor', 'producto', 'licitacion_detalle') raw_id_fields = ('licitacion', 'categoria', 'proveedor', 'producto', 'licitacion_detalle') search_fields = ["CodigoExterno", 'search'] show_facets = admin.ShowFacets.ALLOW def change_view(self, request, object_id, extra_context=None): self.exclude = ('active', 'analizado', 'touch', 'search') return super(LicitacionItemAdmin, self).change_view(request, object_id, extra_context)
when clicking on an item (enter change view), without activating show facets: there are no errors.
when clicking on an item (enter change view), with show facets activated: argument of type 'NoneType' is not iterable (see attached file with the trace)
By completely removing the change_view function, the error does not occur (even if showing facts is activated).
Regards
Note:
See TracTickets
for help on using tickets.
error trace