Fix asset_group reference

This commit is contained in:
Mark Veidemanis 2023-02-14 07:20:47 +00:00
parent f4ae8fbc5f
commit 74fdd8a735
Signed by: m
GPG Key ID: 5ACFCEED46C0904F
1 changed files with 4 additions and 4 deletions

View File

@ -333,15 +333,15 @@ def execute_strategy(callback, strategy, func):
# Callback now verified
# Check against the asset groups
if func == "entry" and strategy.assetgroup is not None:
allowed = assetfilter.get_allowed(strategy, base, quote, direction)
if func == "entry" and strategy.asset_group is not None:
allowed = assetfilter.get_allowed(strategy.asset_group, base, quote, direction)
if not allowed:
log.debug(
f"Denied trading {symbol} due to asset filter {strategy.assetgroup}"
f"Denied trading {symbol} due to asset filter {strategy.asset_group}"
)
sendmsg(
user,
f"Denied trading {symbol} due to asset filter {strategy.assetgroup}",
f"Denied trading {symbol} due to asset filter {strategy.asset_group}",
title="Asset filter denied",
)
return