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:
@@ -79,7 +79,7 @@ class DealService:
|
||||
await self._ensure_contact_in_organization(data.contact_id, context.organization_id)
|
||||
deal = await self._repository.create(data=data, role=context.role, user_id=context.user_id)
|
||||
await invalidate_analytics_cache(
|
||||
self._cache, context.organization_id, self._cache_backoff_ms
|
||||
self._cache, context.organization_id, self._cache_backoff_ms,
|
||||
)
|
||||
return deal
|
||||
|
||||
@@ -120,7 +120,7 @@ class DealService:
|
||||
return deal
|
||||
|
||||
updated = await self._repository.update(
|
||||
deal, changes, role=context.role, user_id=context.user_id
|
||||
deal, changes, role=context.role, user_id=context.user_id,
|
||||
)
|
||||
await self._log_activities(
|
||||
deal_id=deal.id,
|
||||
@@ -128,7 +128,7 @@ class DealService:
|
||||
activities=[activity for activity in [stage_activity, status_activity] if activity],
|
||||
)
|
||||
await invalidate_analytics_cache(
|
||||
self._cache, context.organization_id, self._cache_backoff_ms
|
||||
self._cache, context.organization_id, self._cache_backoff_ms,
|
||||
)
|
||||
return updated
|
||||
|
||||
@@ -150,7 +150,7 @@ class DealService:
|
||||
return
|
||||
for activity_type, payload in entries:
|
||||
activity = Activity(
|
||||
deal_id=deal_id, author_id=author_id, type=activity_type, payload=payload
|
||||
deal_id=deal_id, author_id=author_id, type=activity_type, payload=payload,
|
||||
)
|
||||
self._repository.session.add(activity)
|
||||
await self._repository.session.flush()
|
||||
@@ -160,7 +160,7 @@ class DealService:
|
||||
raise DealOrganizationMismatchError("Operation targets a different organization")
|
||||
|
||||
async def _ensure_contact_in_organization(
|
||||
self, contact_id: int, organization_id: int
|
||||
self, contact_id: int, organization_id: int,
|
||||
) -> Contact:
|
||||
contact = await self._repository.session.get(Contact, contact_id)
|
||||
if contact is None or contact.organization_id != organization_id:
|
||||
@@ -185,5 +185,5 @@ class DealService:
|
||||
effective_amount = updates.amount if updates.amount is not None else deal.amount
|
||||
if effective_amount is None or Decimal(effective_amount) <= Decimal("0"):
|
||||
raise DealStatusValidationError(
|
||||
"Amount must be greater than zero to mark a deal as won"
|
||||
"Amount must be greater than zero to mark a deal as won",
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user