Refactor Query.get() => Session.get() per SQLAlchemy 1.4

This commit is contained in:
Lance Edgar 2023-02-11 22:05:45 -06:00
parent 81aa0ae109
commit f611a5a521
38 changed files with 169 additions and 205 deletions

View file

@ -339,7 +339,7 @@ class APIMasterView(APIView):
if not uuid:
uuid = self.request.matchdict['uuid']
obj = self.Session.query(self.get_model_class()).get(uuid)
obj = self.Session.get(self.get_model_class(), uuid)
if obj:
return obj
@ -390,7 +390,7 @@ class APIMasterView(APIView):
"""
if not uuid:
uuid = self.request.matchdict['uuid']
obj = self.Session.query(self.get_model_class()).get(uuid)
obj = self.Session.get(self.get_model_class(), uuid)
if not obj:
raise self.notfound()