db: Don't use strings to indicate relationship names
Resolve the following RemovedIn20Warning warning: Using strings to indicate relationship names in Query.join() is deprecated and will be removed in SQLAlchemy 2.0. Please use the class-bound attribute directly. Change-Id: Ibec32b9826595355b4ebb89c8a97d054c3c7d75b Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
This commit is contained in:
parent
58f97d0525
commit
dce5f293f5
|
@ -4065,7 +4065,7 @@ def _snapshot_data_get_for_project(
|
|||
query = query.filter(~models.Snapshot.use_quota.is_(False))
|
||||
|
||||
if volume_type_id or host:
|
||||
query = query.join('volume')
|
||||
query = query.join(models.Snapshot.volume)
|
||||
if volume_type_id:
|
||||
query = query.filter(
|
||||
models.Volume.volume_type_id == volume_type_id
|
||||
|
|
|
@ -190,13 +190,6 @@ class WarningsFixture(fixtures.Fixture):
|
|||
# ...but filter everything out until we get around to fixing them
|
||||
# TODO: Fix all of these
|
||||
|
||||
warnings.filterwarnings(
|
||||
'ignore',
|
||||
module='cinder',
|
||||
message='Using strings to indicate relationship names in Query',
|
||||
category=sqla_exc.SADeprecationWarning,
|
||||
)
|
||||
|
||||
warnings.filterwarnings(
|
||||
'ignore',
|
||||
module='cinder',
|
||||
|
|
Loading…
Reference in New Issue