Skip to content

Commit

Permalink
Fix import for sqlalchemy 1.4
Browse files Browse the repository at this point in the history
RowProxys no longer exist. We can't change
it to the new Row's because they don't exist
in older sqlachemy.
  • Loading branch information
jeremyh committed Mar 23, 2021
1 parent 22de9b7 commit 50a7512
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cubedash/summary/_stores.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
from sqlalchemy import DDL, String, and_, func, select, exists, or_, union_all, literal
from sqlalchemy.dialects import postgresql as postgres
from sqlalchemy.dialects.postgresql import TSTZRANGE
from sqlalchemy.engine import Engine, RowProxy
from sqlalchemy.engine import Engine
from sqlalchemy.sql import Select

try:
Expand Down Expand Up @@ -599,7 +599,7 @@ def _find_product_fixed_metadata(
product=product.name,
sample_percentage=round(sample_percentage, 2),
)
result: List[RowProxy] = self._engine.execute(
result = self._engine.execute(
select(
[
(
Expand All @@ -612,7 +612,7 @@ def _find_product_fixed_metadata(
)
.select_from(dataset_table)
.where(dataset_table.c.dataset_type_ref == product.id)
.where(dataset_table.c.archived == None)
.where(dataset_table.c.archived.is_(None))
).fetchall()
assert len(result) == 1

Expand Down

0 comments on commit 50a7512

Please sign in to comment.