Merge "[sqlalchemy-20] Replace Query.get() with Session.get()"

This commit is contained in:
Zuul 2023-07-25 10:29:09 +00:00 committed by Gerrit Code Review
commit 656897f32e
1 changed files with 1 additions and 1 deletions

View File

@ -42,7 +42,7 @@ class InstanceSnapshot(object):
object and updates the object with the column values stored in this
snapshot.
"""
db_obj = session.query(self._model_class).get(self._identity_key)
db_obj = session.get(self._model_class, self._identity_key)
if db_obj:
for col in self._cols:
setattr(db_obj, col, getattr(self, col))