Spaces:
Runtime error
Runtime error
Commit
·
f63e73c
1
Parent(s):
e361083
Update routes/student_routes.py
Browse files- routes/student_routes.py +2 -2
routes/student_routes.py
CHANGED
|
@@ -16,8 +16,8 @@ router = APIRouter()
|
|
| 16 |
async def add_student_data(student: StudentSchema = Body(...)):
|
| 17 |
student = jsonable_encoder(student)
|
| 18 |
|
| 19 |
-
if get_student_data(student["pin"]):
|
| 20 |
-
|
| 21 |
|
| 22 |
new_student = await add(student)
|
| 23 |
return ResponseModel(new_student, "Student added successfully.")
|
|
|
|
| 16 |
async def add_student_data(student: StudentSchema = Body(...)):
|
| 17 |
student = jsonable_encoder(student)
|
| 18 |
|
| 19 |
+
# if get_student_data(student["pin"]):
|
| 20 |
+
# return ErrorResponseModel("Student Exist", 404, f"Student with PIN: {student['pin']} already exists.")
|
| 21 |
|
| 22 |
new_student = await add(student)
|
| 23 |
return ResponseModel(new_student, "Student added successfully.")
|