From e49b6501670fce83e154353978751815c1237b17 Mon Sep 17 00:00:00 2001 From: Artem Gordinskiy Date: Sun, 4 Aug 2024 14:28:11 +0200 Subject: [PATCH] Don't cast account_id to integer to support other type of primary keys --- src/django_paddle_billing/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/django_paddle_billing/models.py b/src/django_paddle_billing/models.py index 7039446..54183ce 100644 --- a/src/django_paddle_billing/models.py +++ b/src/django_paddle_billing/models.py @@ -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