Skip to content

Commit

Permalink
make boolean check explicit
Browse files Browse the repository at this point in the history
  • Loading branch information
johncmerfeld committed Nov 14, 2024
1 parent 0393c1f commit 4a60521
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion airflow/utils/db.py
Original file line number Diff line number Diff line change
Expand Up @@ -1557,7 +1557,9 @@ def __setstate__(self, state: Any) -> None:
self._session = get_current_task_instance_session()

def __bool__(self) -> bool:
return check_query_exists(self._select_asc, session=self._session)
if check := check_query_exists(self._select_asc, session=self._session) is not None:
return check
return False

def __eq__(self, other: Any) -> bool:
if not isinstance(other, collections.abc.Sequence):
Expand Down

0 comments on commit 4a60521

Please sign in to comment.