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/05/06 18:46:27 UTC

[GitHub] [airflow] XD-DENG commented on a change in pull request #8742: Avoid color info in response of /dag_stats & /task_stats

XD-DENG commented on a change in pull request #8742:
URL: https://github.com/apache/airflow/pull/8742#discussion_r421013821



##########
File path: airflow/www/views.py
##########
@@ -337,6 +337,9 @@ def get_int_arg(value, default=0):
 
         num_of_pages = int(math.ceil(num_of_all_dags / float(dags_per_page)))
 
+        state_color_mapping = State.state_color.copy()
+        state_color_mapping["null"] = state_color_mapping.pop(None)

Review comment:
       `None` is one of the keys in `State.state_color`, and it cannot be handled by Flask's `tojson` directly. So a special treatment is needed here.
   
   A related issue I raised in Flask: https://github.com/pallets/flask/issues/3599




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