Skip to content

Commit

Permalink
fix the aws_marketplace_subscription method
Browse files Browse the repository at this point in the history
  • Loading branch information
meln1k committed Mar 4, 2024
1 parent 96e0fcc commit ffd93c9
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions fixbackend/subscription/subscription_repository.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,10 @@ async def aws_marketplace_subscription(
self, user_id: UserId, customer_identifier: str
) -> Optional[AwsMarketplaceSubscription]:
async with self.session_maker() as session:
stmt = select(SubscriptionEntity).where(
SubscriptionEntity.aws_customer_identifier == customer_identifier
and SubscriptionEntity.user_id == user_id
stmt = (
select(SubscriptionEntity)
.where(SubscriptionEntity.aws_customer_identifier == customer_identifier)
.where(SubscriptionEntity.user_id == user_id)
)
if result := (await session.execute(stmt)).scalar_one_or_none():
return result.to_model()
Expand Down

0 comments on commit ffd93c9

Please sign in to comment.