ffinfo commented on a change in pull request #4396: [AIRFLOW-3585] - Add edges 
to database
URL: https://github.com/apache/airflow/pull/4396#discussion_r257416396
 
 

 ##########
 File path: airflow/www/views.py
 ##########
 @@ -1349,21 +1357,26 @@ class GraphForm(DateTimeWithNumRunsWithDagRunsForm):
         form = GraphForm(data=dt_nr_dr_data)
         form.execution_date.choices = dt_nr_dr_data['dr_choices']
 
-        task_instances = {
+        task_instances_dict = {
             ti.task_id: alchemy_to_dict(ti)
-            for ti in dag.get_task_instances(session, dttm, dttm)}
+            for ti in task_instances}
         tasks = {
             t.task_id: {
                 'dag_id': t.dag_id,
-                'task_type': t.task_type,
+                'task_type': t.operator,
             }
-            for t in dag.tasks}
+            for t in task_instances}
         if not tasks:
             flash("No tasks found", "error")
         session.commit()
         doc_md = markdown.markdown(dag.doc_md) \
             if hasattr(dag, 'doc_md') and dag.doc_md else ''
 
+        unique_ops = {
 
 Review comment:
   I have tried this but someone this does not work and the current code does 
work ;)

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to