Skip to content

Commit

Permalink
fix: missing sqlite dialect (langflow-ai#4599)
Browse files Browse the repository at this point in the history
fix: missing sqlite dialect import
  • Loading branch information
italojohnny authored and diogocabral committed Nov 26, 2024
1 parent c55830b commit 1853814
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/backend/base/langflow/services/database/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
from alembic.config import Config
from loguru import logger
from sqlalchemy import event, inspect
from sqlalchemy.dialects import sqlite as dialect_sqlite
from sqlalchemy.engine import Engine
from sqlalchemy.exc import OperationalError
from sqlalchemy.ext.asyncio import AsyncEngine, create_async_engine
Expand Down Expand Up @@ -117,9 +118,7 @@ def _get_connect_args(self):
return connect_args

def on_connection(self, dbapi_connection, _connection_record) -> None:
if isinstance(
dbapi_connection, sqlite3.Connection | sa.dialects.sqlite.aiosqlite.AsyncAdapt_aiosqlite_connection
):
if isinstance(dbapi_connection, sqlite3.Connection | dialect_sqlite.aiosqlite.AsyncAdapt_aiosqlite_connection):
pragmas: dict = self.settings_service.settings.sqlite_pragmas or {}
pragmas_list = []
for key, val in pragmas.items():
Expand Down

0 comments on commit 1853814

Please sign in to comment.