From 2fd44c2b1fe4c6f92ac0c9952ed626a13ecca4b2 Mon Sep 17 00:00:00 2001 From: Martyn Klassen Date: Tue, 17 Jan 2023 09:50:39 -0500 Subject: [PATCH] Remove use of deprecated query.get() --- flask_admin/contrib/sqla/view.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flask_admin/contrib/sqla/view.py b/flask_admin/contrib/sqla/view.py index 3095e8d3f..bf760a825 100755 --- a/flask_admin/contrib/sqla/view.py +++ b/flask_admin/contrib/sqla/view.py @@ -1116,7 +1116,7 @@ def get_one(self, id): :param id: Model id """ - return self.session.query(self.model).get(tools.iterdecode(id)) + return self.session.get(self.model, tools.iterdecode(id)) # Error handler def handle_view_exception(self, exc):