feat: folders as projects

Co-Authored-By: Classic298 <27028174+Classic298@users.noreply.github.com>
This commit is contained in:
Timothy Jaeryang Baek
2025-07-13 03:23:05 +04:00
co-authored by Classic298
parent 5abc03f4dd
commit 7607c53bd5
6 changed files with 238 additions and 69 deletions
+2 -2
View File
@@ -212,13 +212,13 @@ class FolderTable:
.first()
)
if existing_folder:
if existing_folder and existing_folder.id != id:
return None
folder.name = form_data.get("name", folder.name)
if "data" in form_data:
folder.data = {
**folder.data,
**(folder.data or {}),
**form_data["data"],
}
+1 -1
View File
@@ -120,7 +120,7 @@ async def update_folder_name_by_id(
existing_folder = Folders.get_folder_by_parent_id_and_user_id_and_name(
folder.parent_id, user.id, form_data.name
)
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"),