Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix mssql errors when fetching paused dag ids #9948

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion airflow/models/dag.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
from sqlalchemy import Boolean, Column, ForeignKey, Index, Integer, String, Text, func, or_
from sqlalchemy.orm import backref, joinedload, relationship
from sqlalchemy.orm.session import Session
from sqlalchemy.sql import expression

from airflow import settings, utils
from airflow.configuration import conf
Expand Down Expand Up @@ -1805,7 +1806,7 @@ def get_paused_dag_ids(dag_ids: List[str], session: Session = None) -> Set[str]:
"""
paused_dag_ids = (
session.query(DagModel.dag_id)
.filter(DagModel.is_paused.is_(True))
.filter(DagModel.is_paused == expression.true())
.filter(DagModel.dag_id.in_(dag_ids))
.all()
)
Expand Down