Skip to content

Commit 918c554

Browse files
jlubckeboxed
authored andcommitted
Make debug menu template list stable in order
1 parent b203298 commit 918c554

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

iommi/debug.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,13 +184,14 @@ def url_for_template(t):
184184

185185
return local_debug_url_builder(t, 1)
186186

187+
unique_templates = list(dict.fromkeys(request.iommi_used_templates))
187188
links = [
188189
format_html(
189190
'<li><a href="{}">{}</a></li>',
190191
url_for_template(t),
191192
t,
192193
)
193-
for t in set(request.iommi_used_templates)
194+
for t in unique_templates
194195
]
195196
links = format_html('{}' * len(links), *links)
196197
return HttpResponse(

0 commit comments

Comments
 (0)