mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-03-20 03:57:30 +08:00
fix async
This commit is contained in:
@@ -115,7 +115,6 @@ async def update_subscribe(
|
||||
# 是否手动修改过总集数
|
||||
if subscribe_in.total_episode != subscribe.total_episode:
|
||||
subscribe_dict["manual_total_episode"] = 1
|
||||
await subscribe.async_update(db, subscribe_dict)
|
||||
# 发送订阅调整事件
|
||||
subscribe = await subscribe.async_get(db, subscribe_in.id)
|
||||
eventmanager.send_event(EventType.SubscribeModified, {
|
||||
|
||||
@@ -45,9 +45,8 @@ async def create_user(
|
||||
if user_info.get("password"):
|
||||
user_info["hashed_password"] = get_password_hash(user_info["password"])
|
||||
user_info.pop("password")
|
||||
user = User(**user_info)
|
||||
await user.async_create(db)
|
||||
return schemas.Response(success=True)
|
||||
user = await User(**user_info).async_create(db)
|
||||
return schemas.Response(success=True if user else False)
|
||||
|
||||
|
||||
@router.put("/", summary="更新用户", response_model=schemas.Response)
|
||||
|
||||
@@ -154,11 +154,7 @@ async def workflow_fork(
|
||||
return schemas.Response(success=False, message="已存在相同名称的工作流")
|
||||
|
||||
# 创建新工作流
|
||||
workflow_obj = Workflow(**workflow_dict)
|
||||
await workflow_obj.async_create(db)
|
||||
|
||||
# 获取工作流ID(在数据库会话有效时)
|
||||
workflow = await workflow_oper.async_get_by_name(workflow_dict["name"])
|
||||
workflow = await Workflow(**workflow_dict).async_create(db)
|
||||
|
||||
# 更新复用次数
|
||||
if workflow:
|
||||
|
||||
Reference in New Issue
Block a user