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 2020/02/02 10:34:17 UTC

[GitHub] [airflow] ashb commented on a change in pull request #6900: [AIRFLOW-6346] Enhance dag default_view and orientation

ashb commented on a change in pull request #6900: [AIRFLOW-6346] Enhance dag default_view and orientation
URL: https://github.com/apache/airflow/pull/6900#discussion_r373834415
 
 

 ##########
 File path: airflow/models/dag.py
 ##########
 @@ -300,8 +302,16 @@ def __init__(
         self.max_active_runs = max_active_runs
         self.dagrun_timeout = dagrun_timeout
         self.sla_miss_callback = sla_miss_callback
-        self._default_view = default_view
-        self.orientation = orientation
+        if default_view in DEFAULT_VIEW_PRESETS:
+            self.default_view = default_view
+        else:
+            raise AirflowException(f'Invalid values of dag.default_view: only support '
+                                   f'{DEFAULT_VIEW_PRESETS}, but get {default_view}')
 
 Review comment:
   Do f-strings work in py3.6?

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services