Skip to content

Commit

Permalink
fix: fix select statement, remove unnecessary code in testing/__init__()
Browse files Browse the repository at this point in the history
  • Loading branch information
martynia committed Nov 1, 2024
1 parent 4787374 commit 85da2cc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ async def send_message(

async with db.engine_context():
async with db:
stmt = select(
(PilotAgents.PilotID).where(PilotAgents.PilotStamp == data.pilot_stamp)
stmt = select(PilotAgents.PilotID).where(
PilotAgents.PilotStamp == data.pilot_stamp
)
pilot_id = (await db.conn.execute(stmt)).scalar_one()

Expand Down
3 changes: 1 addition & 2 deletions diracx-testing/src/diracx/testing/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,7 @@ def enrich_tokens(access_payload: dict, refresh_payload: dict):
test_dev_settings,
],
database_urls=database_urls,
os_database_conn_kwargs=os_database_conn_kwargs
| {"PilotLogsDB": {"sqlalchemy_dsn": "sqlite+aiosqlite:///:memory:"}},
os_database_conn_kwargs=os_database_conn_kwargs,
config_source=ConfigSource.create_from_url(
backend_url=f"git+file://{with_config_repo}"
),
Expand Down

0 comments on commit 85da2cc

Please sign in to comment.