'As a workaround for AIRFLOW-252, this method overrides Flask-Admin\'s ModelView.get_one().
TODO: this method should be removed once the below bug is fixed on Flask-Admin side.
https://github.com/flask-admin/flask-admin/issues/1226'

def get_one(self, id):

    (task_id, dag_id, execution_date) = iterdecode(id)
    execution_date = dateutil.parser.parse(execution_date)
    return self.session.query(self.model).get((task_id, dag_id, execution_date))
