You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by ka...@apache.org on 2021/03/10 00:52:43 UTC

[airflow] 05/05: Make rbac_app's db.session use the same timezone with @provide_session (#14025)

This is an automated email from the ASF dual-hosted git repository.

kaxilnaik pushed a commit to branch v1-10-test
in repository https://gitbox.apache.org/repos/asf/airflow.git

commit cb05771a80d8ed68efa853fe9eb18013cb7661bf
Author: zlhsmfj <zl...@gmail.com>
AuthorDate: Thu Feb 4 19:09:51 2021 +0800

    Make rbac_app's db.session use the same timezone with @provide_session (#14025)
---
 airflow/www_rbac/app.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/airflow/www_rbac/app.py b/airflow/www_rbac/app.py
index 49ffaf6..18a355a 100644
--- a/airflow/www_rbac/app.py
+++ b/airflow/www_rbac/app.py
@@ -83,6 +83,8 @@ def create_app(config=None, session=None, testing=False, app_name="Airflow"):
     csrf.init_app(app)
 
     db = SQLA(app)
+    from airflow.utils.sqlalchemy import setup_event_handlers
+    setup_event_handlers(db.session.get_bind())
 
     from airflow import api
     api.load_auth()