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



##########
File path: airflow/models/dag.py
##########
@@ -2403,6 +2507,24 @@ def __init__(self, concurrency=None, **kwargs):
     def __repr__(self):
         return f"<DAG: {self.dag_id}>"
 
+    @property
+    def data_interval(self) -> Optional[Tuple[datetime, datetime]]:
+        if self.next_dagrun_data_interval_start is None:
+            if self.next_dagrun_data_interval_end is not None:
+                raise AirflowException(
+                    "Inconsistent DagModel: next_dagrun_data_interval_start 
and "
+                    "next_dagrun_data_interval_end must be either both None or 
both datetime"
+                )
+            return None
+        return (self.next_dagrun_data_interval_start, 
self.next_dagrun_data_interval_end)

Review comment:
       Yes, this should be `next_data_interval` instead.




-- 
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-unsubscr...@airflow.apache.org

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


Reply via email to