critical! insert_explore_app_list_api (#21277)
This commit is contained in:
parent
3f9ced5374
commit
77be115f09
1 changed files with 27 additions and 28 deletions
|
|
@ -56,8 +56,7 @@ class InsertExploreAppListApi(Resource):
|
||||||
parser.add_argument("position", type=int, required=True, nullable=False, location="json")
|
parser.add_argument("position", type=int, required=True, nullable=False, location="json")
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
with Session(db.engine) as session:
|
app = db.session.execute(select(App).filter(App.id == args["app_id"])).scalar_one_or_none()
|
||||||
app = session.execute(select(App).filter(App.id == args["app_id"])).scalar_one_or_none()
|
|
||||||
if not app:
|
if not app:
|
||||||
raise NotFound(f"App '{args['app_id']}' is not found")
|
raise NotFound(f"App '{args['app_id']}' is not found")
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue