mirror of
https://github.com/Significant-Gravitas/AutoGPT.git
synced 2026-04-08 03:00:28 -04:00
fix(backend): Unbreak add_store_agent_to_library (#10166)
- Follow-up fix for #9786 A change to a DB statement introduced in #9786 turns out to be breaking. Apparently `connect` can't just be used for *some* relations: if it is used, it must be used for *all* relations created by the statement. ### Changes 🏗️ - Fix broken DB statement in `add_store_agent_to_library(..)` ### Checklist 📋 #### For code changes: - [x] I have clearly listed my changes in the PR description - [x] I have made a test plan - [x] I have tested my changes according to the test plan: - [x] Add store agent to library Co-authored-by: Swifty <craigswift13@gmail.com>
This commit is contained in:
committed by
GitHub
parent
2269e3593a
commit
b477d31641
@@ -466,15 +466,15 @@ async def add_store_agent_to_library(
|
||||
|
||||
# Create LibraryAgent entry
|
||||
added_agent = await prisma.models.LibraryAgent.prisma().create(
|
||||
data=prisma.types.LibraryAgentCreateInput(
|
||||
userId=user_id,
|
||||
AgentGraph={
|
||||
data={
|
||||
"User": {"connect": {"id": user_id}},
|
||||
"AgentGraph": {
|
||||
"connect": {
|
||||
"graphVersionId": {"id": graph.id, "version": graph.version}
|
||||
}
|
||||
},
|
||||
isCreatedByUser=False,
|
||||
),
|
||||
"isCreatedByUser": False,
|
||||
},
|
||||
include=library_agent_include(user_id),
|
||||
)
|
||||
logger.debug(
|
||||
|
||||
Reference in New Issue
Block a user