2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-14 02:55:41 +00:00

make keyvalue non-existing key tolerant

This commit is contained in:
Matthias
2021-08-05 01:24:49 +02:00
parent 58f2dce18d
commit d6c6cb96ba

View File

@ -269,7 +269,7 @@ def keyvalue(dict, key):
usage:
{% mydict|keyvalue:mykey %}
"""
return dict[key]
return dict.get(key)
@register.simple_tag()