mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-30 04:26:44 +00:00
make keyvalue non-existing key tolerant
This commit is contained in:
parent
58f2dce18d
commit
d6c6cb96ba
@ -269,7 +269,7 @@ def keyvalue(dict, key):
|
|||||||
usage:
|
usage:
|
||||||
{% mydict|keyvalue:mykey %}
|
{% mydict|keyvalue:mykey %}
|
||||||
"""
|
"""
|
||||||
return dict[key]
|
return dict.get(key)
|
||||||
|
|
||||||
|
|
||||||
@register.simple_tag()
|
@register.simple_tag()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user