Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix warnings related to Query.get() in backend #34

Open
larsmoan opened this issue Jun 1, 2024 · 0 comments
Open

Fix warnings related to Query.get() in backend #34

larsmoan opened this issue Jun 1, 2024 · 0 comments

Comments

@larsmoan
Copy link
Contributor

larsmoan commented Jun 1, 2024

We have a bunch of these warnings from the testing of our backend:
"
/home/runner/work/P03-Brewbucks/P03-Brewbucks/backend/brewbucks/views/routes.py:101: LegacyAPIWarning: The Query.get() method is considered legacy as of the 1.x series of SQLAlchemy and becomes a legacy construct in 2.0. The method is now available as Session.get() (deprecated since: 2.0) (Background on SQLAlchemy 2.0 at: https://sqlalche.me/e/b8d9)
user = Users.query.get(user_id)
"

Query.get() is legacy, we should use Session.get()

Not critical, but shouldn't be too much of an issue altering it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant