fbertos commented on a change in pull request #20485:
URL: https://github.com/apache/airflow/pull/20485#discussion_r777933839
##########
File path: airflow/api_connexion/endpoints/dag_run_endpoint.py
##########
@@ -204,6 +207,10 @@ def get_dag_runs_batch(*, session: Session = NEW_SESSION)
-> APIResponse:
else:
query = query.filter(DagRun.dag_id.in_(readable_dag_ids))
+ if data.get("states"):
+ states = set(data["states"])
+ query = query.filter(DagRun.state.in_(states))
Review comment:
Hi @uranusjr , thanks for your recommendation, but after that change I
had this errors:
```
> states = set(data["states"])
E TypeError: 'NoneType' object is not iterable
```
So I put it back as the other lines (f.i. variable dag_ids, line 205) with
the variable inside the block.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]