Skip to content

Commit c276385

Browse files
committed
make CreateWorkflow.tasks optional
1 parent 4aa3046 commit c276385

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

jupyter_scheduler/workflows.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
class WorkflowsHandler(ExtensionHandlerMixin, JobHandlersMixin, APIHandler):
2222
@authenticated
2323
async def post(self):
24-
payload = self.get_json_body()
24+
payload = self.get_json_body() or {}
2525
try:
2626
workflow_id = await ensure_async(
2727
self.scheduler.create_workflow(CreateWorkflow(**payload))
@@ -160,7 +160,7 @@ async def post(self, workflow_id: str):
160160

161161

162162
class CreateWorkflow(BaseModel):
163-
tasks: List[str]
163+
tasks: List[str] = []
164164

165165

166166
class DescribeWorkflow(BaseModel):

0 commit comments

Comments
 (0)