mirror of
https://github.com/apache/superset.git
synced 2026-04-18 23:55:00 +00:00
fix(models): prevent SQLAlchemy and_() deprecation warning (#37020)
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -3214,10 +3214,12 @@ class ExploreMixin: # pylint: disable=too-many-public-methods
|
||||
)
|
||||
|
||||
if granularity:
|
||||
qry = qry.where(and_(*(time_filters + where_clause_and)))
|
||||
else:
|
||||
if time_filters or where_clause_and:
|
||||
qry = qry.where(and_(*(time_filters + where_clause_and)))
|
||||
elif where_clause_and:
|
||||
qry = qry.where(and_(*where_clause_and))
|
||||
qry = qry.having(and_(*having_clause_and))
|
||||
if having_clause_and:
|
||||
qry = qry.having(and_(*having_clause_and))
|
||||
|
||||
self.make_orderby_compatible(select_exprs, orderby_exprs)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user