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 # Callback now verified
# Check against the asset groups # Check against the asset groups
if func == "entry" and strategy.assetgroup is not None: if func == "entry" and strategy.asset_group is not None:
allowed = assetfilter.get_allowed(strategy, base, quote, direction) allowed = assetfilter.get_allowed(strategy.asset_group, base, quote, direction)
if not allowed: if not allowed:
log.debug( log.debug(
f"Denied trading {symbol} due to asset filter {strategy.assetgroup}" f"Denied trading {symbol} due to asset filter {strategy.asset_group}"
) )
sendmsg( sendmsg(
user, 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", title="Asset filter denied",
) )
return return