diff --git a/octobot/community/supabase_backend/community_supabase_client.py b/octobot/community/supabase_backend/community_supabase_client.py index a8d17e9d1..ceac74dc0 100644 --- a/octobot/community/supabase_backend/community_supabase_client.py +++ b/octobot/community/supabase_backend/community_supabase_client.py @@ -437,9 +437,10 @@ async def fetch_bot_profile_data(self, bot_config_id: str) -> commons_profiles.P ")" ).eq(enums.BotConfigKeys.ID.value, bot_config_id).execute()).data[0] try: - profile_data = commons_profiles.ProfileData.from_dict( - bot_config["product_config"][enums.ProfileConfigKeys.CONFIG.value] - ) + profile_config = bot_config["product_config"][enums.ProfileConfigKeys.CONFIG.value] + if not profile_config: + raise TypeError(f"product_config.config is '{profile_config}'") + profile_data = commons_profiles.ProfileData.from_dict(profile_config) except (TypeError, KeyError) as err: raise errors.InvalidBotConfigError(f"Missing bot product config: {err} ({err.__class__.__name__})") from err profile_data.profile_details.name = bot_config["product_config"].get("product", {}).get(