Skip to content

Commit b8d2af9

Browse files
committed
BugFix: ruff check . --fix; ruff format .
1 parent db59966 commit b8d2af9

File tree

1 file changed

+7
-11
lines changed

1 file changed

+7
-11
lines changed

backend/main.py

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1-
21
from datetime import datetime
3-
from bson import ObjectId
4-
from fastapi import FastAPI, HTTPException
5-
from fastapi.middleware.cors import CORSMiddleware
62

3+
from bson import ObjectId
74
from database import schemas_collection
85
from datamodel import SchemaDefinition, UpdateSchema
6+
from fastapi import FastAPI, HTTPException
7+
from fastapi.middleware.cors import CORSMiddleware
98

109
# Initialize FastAPI application
1110
app = FastAPI()
@@ -19,6 +18,7 @@
1918
allow_headers=["*"],
2019
)
2120

21+
2222
@app.get("/schemas")
2323
async def get_all_schemas():
2424
"""
@@ -74,7 +74,9 @@ async def update_schema(id: str, update: UpdateSchema):
7474
dict: Success message.
7575
"""
7676
# Prepare update fields (ignore None values)
77-
update_fields = {key: value for key, value in update.dict().items() if value is not None}
77+
update_fields = {
78+
key: value for key, value in update.dict().items() if value is not None
79+
}
7880

7981
result = schemas_collection.update_one(
8082
{"_id": ObjectId(id)},
@@ -102,9 +104,3 @@ async def delete_schema(id: str):
102104

103105
if result.deleted_count == 0:
104106
raise HTTPException(status_code=404, detail="Schema not found")
105-
106-
107-
108-
109-
110-

0 commit comments

Comments
 (0)