mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-05-11 00:32:38 +02:00
clean up
This commit is contained in:
parent
85664f2ff8
commit
ecbb1f27e0
3 changed files with 2 additions and 23 deletions
|
|
@ -60,27 +60,6 @@ async def get_connector_by_id(
|
|||
return result.scalars().first()
|
||||
|
||||
|
||||
async def get_connector_by_type(
|
||||
session: AsyncSession, connector_type: SearchSourceConnectorType
|
||||
) -> SearchSourceConnector | None:
|
||||
"""
|
||||
Get a connector by type from the database.
|
||||
|
||||
Args:
|
||||
session: Database session
|
||||
connector_type: Type of the connector
|
||||
|
||||
Returns:
|
||||
Connector object if found, None otherwise
|
||||
"""
|
||||
result = await session.execute(
|
||||
select(SearchSourceConnector).filter(
|
||||
SearchSourceConnector.connector_type == connector_type,
|
||||
)
|
||||
)
|
||||
return result.scalars().first()
|
||||
|
||||
|
||||
def calculate_date_range(
|
||||
connector: SearchSourceConnector,
|
||||
start_date: str | None = None,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue