bugraoz93 commented on code in PR #42782:
URL: https://github.com/apache/airflow/pull/42782#discussion_r1794309937


##########
airflow/api_fastapi/parameters.py:
##########
@@ -144,17 +146,24 @@ def depends(self, dag_display_name_pattern: str | None = 
None) -> _DagDisplayNam
         return self.set_value(dag_display_name_pattern)
 
 
+# SortParam Implementations
 class SortParam(BaseParam[str]):
     """Order result by the attribute."""
 
-    attr_mapping = {
-        "last_run_state": DagRun.state,
-        "last_run_start_date": DagRun.start_date,
-    }
-
-    def __init__(self, allowed_attrs: list[str]) -> None:
+    def __init__(
+        self,
+        allowed_attrs: list[str],
+        attr_mapping: dict[str, Any],
+        model: type[BaseModel],
+        order_column: Column,
+        to_replace: dict[str, str] | None,
+    ) -> None:
         super().__init__()
         self.allowed_attrs = allowed_attrs
+        self.attr_mapping = attr_mapping
+        self.model = model

Review Comment:
   Since your last suggestion included the model in the Annotated definition, I 
haven't deleted the model part.



-- 
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]

Reply via email to