Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jan 31, 2024
1 parent fc646ac commit 36dee28
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
8 changes: 5 additions & 3 deletions boxoffice/models/line_item_discounter.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,11 @@ def apply_discount(
ticket_id=line_item.ticket_id,
base_amount=line_item.base_amount,
discount_policy_id=cast(UUID, policy_coupon.policy.id),
discount_coupon_id=cast(UUID, policy_coupon.coupon.id)
if policy_coupon.coupon
else None,
discount_coupon_id=(
cast(UUID, policy_coupon.coupon.id)
if policy_coupon.coupon
else None
),
discounted_amount=discounted_amount,
final_amount=line_item.base_amount - discounted_amount,
)
Expand Down
1 change: 1 addition & 0 deletions migrations/versions/32abb3608d9a_simplify_discounts.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
Create Date: 2016-04-04 15:44:09.872938
"""

from alembic import op
from sqlalchemy.sql import column, table
import sqlalchemy as sa
Expand Down
8 changes: 5 additions & 3 deletions scripts/razorpay_settlement.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,11 @@ def format_line_item(settlement_id, payment_id, line_item: LineItem, payment_sta
'discounted_amount': line_item.discounted_amount,
'final_amount': line_item.final_amount,
'payment_status': payment_status,
'transaction_date': localize_timezone(transaction_date, 'Asia/Kolkata')
if transaction_date is not None
else None,
'transaction_date': (
localize_timezone(transaction_date, 'Asia/Kolkata')
if transaction_date is not None
else None
),
}


Expand Down

0 comments on commit 36dee28

Please sign in to comment.