Skip to content

AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.

fix(frontend): Ensure agent version is fetched when active_version_id exists (#11291)

seer-by-sentry[bot]fbd5f34a6149
diff --git a/autogpt_platform/frontend/src/app/(platform)/marketplace/agent/[creator]/[slug]/page.tsx b/autogpt_platform/frontend/src/app/(platform)/marketplace/agent/[creator]/[slug]/page.tsx
index 25b81e39f0..124db89385 100644
--- a/autogpt_platform/frontend/src/app/(platform)/marketplace/agent/[creator]/[slug]/page.tsx
+++ b/autogpt_platform/frontend/src/app/(platform)/marketplace/agent/[creator]/[slug]/page.tsx
@@ -55,13 +55,13 @@ export default async function MarketplaceAgentPage({
creator_lower,
params.slug,
); // Already cached in above prefetch
- if (status === 200) {
+ if (status === 200 && user && creator_agent.active_version_id) {
await prefetchGetV2GetAgentByStoreIdQuery(
queryClient,
- creator_agent.active_version_id ?? "",
+ creator_agent.active_version_id,
{
query: {
- enabled: !!user && !!creator_agent.active_version_id,
+ enabled: true,
},
},
);