critical! insert_explore_app_list_api (#21277)

pull/21310/head
椰子汁 11 months ago committed by GitHub
parent 3f9ced5374
commit 77be115f09
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -56,8 +56,7 @@ class InsertExploreAppListApi(Resource):
parser.add_argument("position", type=int, required=True, nullable=False, location="json")
args = parser.parse_args()
with Session(db.engine) as session:
app = session.execute(select(App).filter(App.id == args["app_id"])).scalar_one_or_none()
app = db.session.execute(select(App).filter(App.id == args["app_id"])).scalar_one_or_none()
if not app:
raise NotFound(f"App '{args['app_id']}' is not found")

Loading…
Cancel
Save