Skip to content

Commit

Permalink
[Community] use product slug when available
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeDSM committed Jan 30, 2024
1 parent 51ab97e commit 69d806e
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -268,12 +268,15 @@ async def fetch_bot_profile_data(self, bot_config_id: str) -> commons_profiles.P
"product_config:product_configs("
" config, "
" version, "
" product:products!product_id(attributes)"
" product:products!product_id(slug, attributes)"
")"
).eq(enums.BotConfigKeys.ID.value, bot_config_id).execute()).data[0]
profile_data = commons_profiles.ProfileData.from_dict(
bot_config["product_config"][enums.ProfileConfigKeys.CONFIG.value]
)
profile_data.profile_details.name = bot_config["product_config"].get("product", {}).get(
"slug", profile_data.profile_details.name
)
profile_data.trading.minimal_funds = [
commons_profiles.MinimalFund.from_dict(minimal_fund)
for minimal_fund in bot_config["product_config"]["product"][
Expand Down

0 comments on commit 69d806e

Please sign in to comment.