uranusjr commented on a change in pull request #14895:
URL: https://github.com/apache/airflow/pull/14895#discussion_r598736941
##########
File path: airflow/api_connexion/endpoints/dag_endpoint.py
##########
@@ -59,10 +60,19 @@ def get_dag_details(dag_id):
@security.requires_access([(permissions.ACTION_CAN_READ,
permissions.RESOURCE_DAG)])
@format_parameters({'limit': check_limit})
-def get_dags(limit, offset=0):
+def get_dags(limit, sort, offset=0, order_by='dag_id'):
"""Get all DAGs."""
+ columns = [i.name for i in DagModel.__table__.columns] # pylint:
disable=no-member
+ if order_by not in columns:
Review comment:
Also slightly more efficient (only need to go through the columns once).
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]