This commit is contained in:
maruizhi
2026-09-22 09:51:24 +08:00
parent 2b2b4b658f
commit ed51aecf76
4 changed files with 5 additions and 8 deletions
-1
View File
@@ -12,7 +12,6 @@ def select_age(min_age,max_age,db):
db = db.filter(Student_Model.age >= min_age,Student_Model.delete_status == 0)
if max_age is not None:
db = db.filter(Student_Model.age <= max_age,Student_Model.delete_status == 0)
print('abc',db.all())
return db.all()
except HTTPException:
raise
+2 -4
View File
@@ -1,10 +1,8 @@
from fastapi import HTTPException,Depends
from schema.teacher_schema import Teacher_RequestModel
from model.all_model import *
from fastapi import HTTPException
from model.all_model import Teacher_Model
def add_teacher(teacher,session):
try:
print(teacher)
x=Teacher_Model(**teacher)
session.add(x)
session.commit()