File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -1566,7 +1566,6 @@ def get_async_activity_handle(
15661566 run_id: Run ID for the activity. Cannot be
15671567 set if task_token is set.
15681568 activity_id: ID for the activity.
1569- activity_id: ID for the activity.
15701569 task_token: Task token for the activity.
15711570
15721571 Returns:
@@ -1587,7 +1586,18 @@ def get_async_activity_handle(
15871586 workflow_id = workflow_id , run_id = run_id , activity_id = activity_id
15881587 ),
15891588 )
1590- raise ValueError ("Task token or workflow/run/activity ID must be present" )
1589+ elif activity_id is not None :
1590+ return AsyncActivityHandle (
1591+ self ,
1592+ AsyncActivityIDReference (
1593+ activity_id = activity_id ,
1594+ run_id = run_id ,
1595+ workflow_id = None ,
1596+ ),
1597+ )
1598+ raise ValueError (
1599+ "Require task token, or workflow_id & run_id & activity_id, or activity_id & run_id"
1600+ )
15911601
15921602 async def create_schedule (
15931603 self ,
You can’t perform that action at this time.
0 commit comments