Tolerate new SQLAlchemy==1.1.7
The following change in 1.1.x is causing failures.
We should use "is" instead of "==" to check if the
model is the same as the class.
@@ -284,7 +284,7 @@ def model_query(context, model, *args, **kwargs):
_("Unrecognized read_deleted value '%s'") % read_deleted)
if project_only and is_user_context(context):
- if model == models.VolumeAttachment:
+ if model is models.VolumeAttachment:
# NOTE(dulek): In case of VolumeAttachment, we need to join
# `project_id` through `volume` relationship.
query = query.filter(models.Volume.project_id ==
