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 16:41:10 -04:00 • committed by GitHub
parent 2690d04cac
commit 57063aaad8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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'),