mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +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:
|
||||
{% mydict|keyvalue:mykey %}
|
||||
"""
|
||||
return dict[key]
|
||||
return dict.get(key)
|
||||
|
||||
|
||||
@register.simple_tag()
|
||||
|
Loading…
Reference in New Issue
Block a user