diff options
author | morpheus65535 <[email protected]> | 2024-03-03 12:15:23 -0500 |
---|---|---|
committer | GitHub <[email protected]> | 2024-03-03 12:15:23 -0500 |
commit | 03afeb347075381bcb7fd6036295c9fa4a90d2dc (patch) | |
tree | 7c5d72c973d2c8e4ade57391a1c9ad5e94903a46 /libs/flask_sqlalchemy/query.py | |
parent | 9ae684240b5bdd40a870d8122f0e380f8d03a187 (diff) | |
download | bazarr-03afeb347075381bcb7fd6036295c9fa4a90d2dc.tar.gz bazarr-03afeb347075381bcb7fd6036295c9fa4a90d2dc.zip |
Updated multiple Python modules (now in libs and custom_libs directories) and React libraries
Diffstat (limited to 'libs/flask_sqlalchemy/query.py')
-rw-r--r-- | libs/flask_sqlalchemy/query.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/libs/flask_sqlalchemy/query.py b/libs/flask_sqlalchemy/query.py index 4b8c7d1de..35f927d28 100644 --- a/libs/flask_sqlalchemy/query.py +++ b/libs/flask_sqlalchemy/query.py @@ -2,16 +2,15 @@ from __future__ import annotations import typing as t -import sqlalchemy as sa -import sqlalchemy.exc -import sqlalchemy.orm +import sqlalchemy.exc as sa_exc +import sqlalchemy.orm as sa_orm from flask import abort from .pagination import Pagination from .pagination import QueryPagination -class Query(sa.orm.Query): # type: ignore[type-arg] +class Query(sa_orm.Query): # type: ignore[type-arg] """SQLAlchemy :class:`~sqlalchemy.orm.query.Query` subclass with some extra methods useful for querying in a web application. @@ -58,7 +57,7 @@ class Query(sa.orm.Query): # type: ignore[type-arg] """ try: return self.one() - except (sa.exc.NoResultFound, sa.exc.MultipleResultsFound): + except (sa_exc.NoResultFound, sa_exc.MultipleResultsFound): abort(404, description=description) def paginate( |