Replace deprecated Query.as_scalar()

This has been deprecated since SQLAlchemy 1.4.

Change-Id: Id3edcc188bb44d9752fe1bd7625308c5abed4d9c
This commit is contained in:
ramishra 2021-06-25 10:34:16 +05:30 committed by Takashi Kajinami
parent bb97ed77ae
commit af5ffbe019
2 changed files with 2 additions and 2 deletions

View File

@ -537,7 +537,7 @@ def resource_get_all_active_by_stack(context, stack_id):
results = context.session.query(models.Resource).filter_by(
stack_id=stack_id).filter(
models.Resource.id.notin_(subquery.as_scalar())
models.Resource.id.notin_(subquery.scalar_subquery())
).options(orm.joinedload("data")).all()
return dict((res.id, res) for res in results)

View File

@ -65,7 +65,7 @@ PyYAML>=5.1 # MIT
requests>=2.23.0 # Apache-2.0
tenacity>=6.1.0 # Apache-2.0
Routes>=2.3.1 # MIT
SQLAlchemy!=1.1.5,!=1.1.6,!=1.1.7,!=1.1.8,>=1.0.10 # MIT
SQLAlchemy>=1.4.0 # MIT
sqlalchemy-migrate>=0.13.0 # Apache-2.0
stevedore>=3.1.0 # Apache-2.0
WebOb>=1.7.1 # MIT