make keyvalue non-existing key tolerant

This commit is contained in:
Matthias committed 2021-08-05 01:24:49 +02:00
1 parent 58f2dce18d
commit d6c6cb96ba
1 file changed
+1 -1
@@ -269,7 +269,7 @@ def keyvalue(dict, key):
usage:
{% mydict|keyvalue:mykey %}
"""
return dict[key]
return dict.get(key)
@register.simple_tag()