**Apache Airflow version**: 2.1.0

**Browsers**: Chrome and Firefox

**What happened**:

Before upgrading to 2.1.0

![before](https://user-images.githubusercontent.com/14293802/120359517-c1ca1100-c2d5-11eb-95ba-58ccc0a3ac37.png)

After upgrading to 2.1.0

![after](https://user-images.githubusercontent.com/14293802/120359528-c4c50180-c2d5-11eb-8e04-f34846ea2736.png)

**What you expected to happen**:

Show/Edit/Delete under Security -> Users are available

<!-- What do you think went wrong? -->

**How to reproduce it**:

Go to Security -> Users (as an admin of course) 
airflow/www/views.py
"""Returns formatted dag_runs for Tree view"""
        dates = sorted(dag_runs.keys())
        min_date = min(dag_runs, default=None)
        task_instances = {
            (ti.task_id, ti.execution_date): ti
            for ti in dag.get_task_instances(start_date=min_date, end_date=base_date)
        }
        expanded = set()
        
        
        
        node_count = 0
        node_limit = 5000 / max(1, len(dag.leaves))
        def encode_ti(task_instance: Optional[models.TaskInstance]) -> Optional[List]: