You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2021/07/21 12:11:26 UTC

[GitHub] [airflow] uranusjr commented on a change in pull request #17122: AIP-39: Add schedule_date to OpenAPI DAGRun schema

uranusjr commented on a change in pull request #17122:
URL: https://github.com/apache/airflow/pull/17122#discussion_r673915763



##########
File path: airflow/api_connexion/endpoints/dag_run_endpoint.py
##########
@@ -242,24 +242,34 @@ def post_dag_run(dag_id, session):
     except ValidationError as err:
         raise BadRequest(detail=str(err))
 
+    try:
+        schedule_date = post_body.pop("schedule_date")
+    except KeyError:
+        schedule_date = post_body.pop("execution_date")
+

Review comment:
       `DagRun` does not accept `schedule_date` as a keyword argument (yet), so either we need to modify `post_body` or we can’t use `DagRun(..., **post_body)`.




-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org