fix: dropping a folder onto the folder it is already in no longer fails with Folder already exists (#30169)

This commit is contained in:
G30
2026-09-19 15:41:10 -05:00
committed by GitHub
parent 2690d04cac
commit 57063aaad8
+1 -1
View File
@@ -401,7 +401,7 @@ async def update_folder_parent_id_by_id(
form_data.parent_id, user.id, folder.name, db=db
)
if existing_folder:
if existing_folder and existing_folder.id != id:
raise HTTPException(
status_code=status.HTTP_400_BAD_REQUEST,
detail=ERROR_MESSAGES.DEFAULT('Folder already exists'),