refactor(orm): 将所有的批量 delete/update 重构为对象级操作,以确保触发 SQLAlchemy 审计事件
This commit is contained in:
@ -218,8 +218,8 @@ def delete_bom(bom_no):
|
||||
if not exist:
|
||||
return jsonify({'code': 404, 'msg': 'BOM 不存在'}), 404
|
||||
|
||||
# 删除
|
||||
query.delete()
|
||||
# 删除(改为对象级删除以触发审计事件)
|
||||
db.session.delete(exist)
|
||||
db.session.commit()
|
||||
return jsonify({
|
||||
'code': 200,
|
||||
|
||||
Reference in New Issue
Block a user