diff --git a/chowda/views.py b/chowda/views.py index 2c9228d7..d4acb1e4 100644 --- a/chowda/views.py +++ b/chowda/views.py @@ -198,8 +198,8 @@ async def is_action_allowed(self, request: Request, name: str) -> bool: async def start_batches(self, request: Request, pks: List[Any]) -> str: """Starts a Batch by sending a message to the Argo Event Bus""" try: - for batch_id in pks: - with Session(engine) as db: + with Session(engine) as db: + for batch_id in pks: batch = db.get(Batch, batch_id) pipeline = ','.join( [app.endpoint for app in batch.pipeline.clams_apps]