[charts] Fix only seeing first top media instance

This commit is contained in:
2026-06-09 22:08:15 -04:00
parent 709fed5cfe
commit bf9a6a9679
2 changed files with 9 additions and 2 deletions

View File

@ -7,7 +7,10 @@ register = template.Library()
def get_item(dictionary, key):
if isinstance(dictionary, dict):
return dictionary.get(key)
return None
try:
return dictionary[int(key)]
except (IndexError, KeyError, TypeError, ValueError):
return None
@register.filter