fix: add missing commas for syntax correctness across multiple files
Test / test (push) Successful in 15s
Test / test (push) Successful in 15s
This commit is contained in:
@@ -41,7 +41,7 @@ class ActivityRepository:
|
||||
select(Activity)
|
||||
.join(Deal, Deal.id == Activity.deal_id)
|
||||
.where(
|
||||
Activity.deal_id == params.deal_id, Deal.organization_id == params.organization_id
|
||||
Activity.deal_id == params.deal_id, Deal.organization_id == params.organization_id,
|
||||
)
|
||||
.order_by(Activity.created_at)
|
||||
)
|
||||
|
||||
@@ -46,7 +46,7 @@ class ContactRepository:
|
||||
user_id: int,
|
||||
) -> Sequence[Contact]:
|
||||
stmt: Select[tuple[Contact]] = select(Contact).where(
|
||||
Contact.organization_id == params.organization_id
|
||||
Contact.organization_id == params.organization_id,
|
||||
)
|
||||
stmt = self._apply_filters(stmt, params, role, user_id)
|
||||
offset = (max(params.page, 1) - 1) * params.page_size
|
||||
@@ -63,7 +63,7 @@ class ContactRepository:
|
||||
user_id: int,
|
||||
) -> Contact | None:
|
||||
stmt = select(Contact).where(
|
||||
Contact.id == contact_id, Contact.organization_id == organization_id
|
||||
Contact.id == contact_id, Contact.organization_id == organization_id,
|
||||
)
|
||||
result = await self._session.scalars(stmt)
|
||||
return result.first()
|
||||
|
||||
@@ -148,7 +148,7 @@ class DealRepository:
|
||||
return stmt
|
||||
|
||||
def _apply_ordering(
|
||||
self, stmt: Select[tuple[Deal]], params: DealQueryParams
|
||||
self, stmt: Select[tuple[Deal]], params: DealQueryParams,
|
||||
) -> Select[tuple[Deal]]:
|
||||
column = ORDERABLE_COLUMNS.get(params.order_by or "created_at", Deal.created_at)
|
||||
order_func = desc if params.order_desc else asc
|
||||
|
||||
@@ -107,7 +107,7 @@ class TaskRepository:
|
||||
return task
|
||||
|
||||
def _apply_filters(
|
||||
self, stmt: Select[tuple[Task]], params: TaskQueryParams
|
||||
self, stmt: Select[tuple[Task]], params: TaskQueryParams,
|
||||
) -> Select[tuple[Task]]:
|
||||
if params.deal_id is not None:
|
||||
stmt = stmt.where(Task.deal_id == params.deal_id)
|
||||
|
||||
Reference in New Issue
Block a user