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(platform): Restore `See runs` button on marketplace listing page (#9970)
Krzysztof Czerwinskib91b0261647a
diff --git a/autogpt_platform/backend/backend/server/v2/library/routes/agents.py b/autogpt_platform/backend/backend/server/v2/library/routes/agents.pyindex 141d6d2e50..f21a66faa4 100644--- a/autogpt_platform/backend/backend/server/v2/library/routes/agents.py+++ b/autogpt_platform/backend/backend/server/v2/library/routes/agents.py@@ -86,7 +86,7 @@ async def get_library_agent(@router.get(- "/marketplace/{store_listing_version_id}/",+ "/marketplace/{store_listing_version_id}",tags=["store, library"],response_model=library_model.LibraryAgent | None,)diff --git a/autogpt_platform/backend/backend/server/v2/store/db.py b/autogpt_platform/backend/backend/server/v2/store/db.pyindex c37902bc13..dac8cce8a5 100644--- a/autogpt_platform/backend/backend/server/v2/store/db.py+++ b/autogpt_platform/backend/backend/server/v2/store/db.py@@ -146,11 +146,16 @@ async def get_store_agent_details(f"Agent {username}/{agent_name} not found")+ profile = await prisma.models.Profile.prisma().find_first(+ where={"username": username}+ )+ user_id = profile.userId if profile else None+# Retrieve StoreListing to get active_version_id and has_approved_versionstore_listing = await prisma.models.StoreListing.prisma().find_first(where=prisma.types.StoreListingWhereInput(slug=agent_name,- owningUserId=username, # Direct equality check instead of 'has'+ owningUserId=user_id or "",),include={"ActiveVersion": True},)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.tsxindex c0e1115fdf..5850d823c3 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@@ -47,7 +47,7 @@ export default async function Page({});const libraryAgent = user? await api- .getLibraryAgentByStoreListingVersionID(agent.store_listing_version_id)+ .getLibraryAgentByStoreListingVersionID(agent.active_version_id || "").catch((error) => {console.error("Failed to fetch library agent:", error);return null;