Skip to content

Commit

Permalink
Don't cast account_id to integer to support other type of primary keys
Browse files Browse the repository at this point in the history
  • Loading branch information
artemgordinskiy committed Aug 4, 2024
1 parent 7f130a1 commit e49b650
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/django_paddle_billing/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,7 @@ def from_paddle_data(cls, data, occurred_at=None) -> tuple["Subscription | None"
pass

if account_id is not None:
if not get_account_model().objects.filter(pk=int(account_id)).exists():
if not get_account_model().objects.filter(pk=account_id).exists():
error = f"Subscription: Account with id: {account_id} does not exist"
return None, False, error

Expand Down

0 comments on commit e49b650

Please sign in to comment.