changes 删除bug

This commit is contained in:
P3ngSaM 2022-12-09 15:17:22 +08:00
parent 1aa3c63b04
commit 53006ec586
1 changed files with 5 additions and 0 deletions

View File

@ -29,6 +29,11 @@ def delete_scorecard(db: Session, mongodb: MongoHelper, _id: str):
return True
except IntegrityError:
return False
except AttributeError:
db.query(Model.ScoreCard).filter_by(id=_id).delete()
db.commit()
return True
def update_scorecard(db: Session, _id: str, schema: Schema.EditScoreCardReqBody):