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 2022/02/22 20:32:58 UTC

[GitHub] [airflow] Jolcik commented on a change in pull request #20507: Fix DAG date range bug

Jolcik commented on a change in pull request #20507:
URL: https://github.com/apache/airflow/pull/20507#discussion_r812333724



##########
File path: airflow/models/dag.py
##########
@@ -570,7 +570,7 @@ def date_range(
         message = "`DAG.date_range()` is deprecated."
         if num is not None:
             warnings.warn(message, category=DeprecationWarning, stacklevel=2)
-            return utils_date_range(start_date=start_date, num=num)
+            return utils_date_range(start_date=start_date, num=num, delta=self.normalized_schedule_interval)

Review comment:
       Thank you for the review. I added the `catch_warnings` clause to the whole `return` line, because I also noticed that `utils_date_range` was producing yet another deprecation warning. Now it works correctly and using this method emits only one warning. Let me know if that is good now, thanks!




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