Skip to content

Commit

Permalink
server: Use getattr for refund destination details
Browse files Browse the repository at this point in the history
  • Loading branch information
birkjernstrom committed Jan 23, 2025
1 parent 5a9ac37 commit 0fa5e65
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions server/polar/refund/schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,9 @@ def from_stripe(
stripe_reason = stripe_refund.reason if stripe_refund.reason else "other"
reason = RefundReason.from_stripe(stripe_refund.reason)

destination_details: dict[str, Any] = {}
if stripe_refund.destination_details:
destination_details = stripe_refund.destination_details
destination_details: dict[str, Any] = getattr(
stripe_refund, "destination_details", {}
)

status = RefundStatus.pending
if stripe_refund.status:
Expand Down

0 comments on commit 0fa5e65

Please sign in to comment.