mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-11-10 10:21:59 +00:00
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
|
||||
:param trade_id: id of the Trade
|
||||
"""
|
||||
key = key if key is not None else "%"
|
||||
|
||||
filters = [KeyValue.ft_trade_id == trade_id if trade_id is not None else 0,
|
||||
KeyValue.kv_key.ilike(key)]
|
||||
filters = []
|
||||
filters.append(KeyValue.ft_trade_id == trade_id if trade_id is not None else 0)
|
||||
if key is not None:
|
||||
filters.append(KeyValue.kv_key.ilike(key))
|
||||
|
||||
return KeyValue.query.filter(*filters)
|
||||
|
|
Loading…
Reference in New Issue
Block a user