Update handling for query_kv when no Key is supplied.
This commit is contained in:
parent
be169a23f4
commit
f3dee5ec4f
@ -49,9 +49,9 @@ class KeyValue(_DECL_BASE):
|
|||||||
return will be for generic values not tied to a trade
|
return will be for generic values not tied to a trade
|
||||||
:param trade_id: id of the Trade
|
:param trade_id: id of the Trade
|
||||||
"""
|
"""
|
||||||
key = key if key is not None else "%"
|
filters = []
|
||||||
|
filters.append(KeyValue.ft_trade_id == trade_id if trade_id is not None else 0)
|
||||||
filters = [KeyValue.ft_trade_id == trade_id if trade_id is not None else 0,
|
if key is not None:
|
||||||
KeyValue.kv_key.ilike(key)]
|
filters.append(KeyValue.kv_key.ilike(key))
|
||||||
|
|
||||||
return KeyValue.query.filter(*filters)
|
return KeyValue.query.filter(*filters)
|
||||||
|
Loading…
Reference in New Issue
Block a user