﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
35395	Python 3.12 filter bug with Django 4.2.11	Tim Richardson	nobody	"I have a template with a fragment like this:


<span
                            class=""fs-6"">Supplier: {{ po_metadata|get_item:dict_item.PONumber|get_item:""supplier"" }} PO Date: {{ po_metadata|get_item:dict_item.PONumber|get_item:""order_date"" | slice:"":10"" }} </span>


When using python 3.13.2, I get an exception in django/template/defaultfilters.py  slice_filter()

This code does throw an exception with 3.11

The exception is a Key Error and it happens because instead a list being passed to the filter, a dictionary is. An empty dict in my case. 

In python 3.11, the breakpoints  in slice_filter() are not hit. Somehow the preceeding filters are behaving differently in case of po_metadata being an empty  dict.




"	Bug	new	Template system	4.2	Normal				Unreviewed	0	0	0	0	0	0
