From 2c46b9610f0804c6b1bc7126cb29b6bd159c391e Mon Sep 17 00:00:00 2001 From: Snipy7374 <100313469+Snipy7374@users.noreply.github.com> Date: Sat, 21 Dec 2024 23:20:09 +0100 Subject: [PATCH] Update disnake/subscription.py Co-authored-by: vi <8530778+shiftinv@users.noreply.github.com> Signed-off-by: Snipy7374 <100313469+Snipy7374@users.noreply.github.com> --- disnake/subscription.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/disnake/subscription.py b/disnake/subscription.py index dc0f242ab2..5623106e6f 100644 --- a/disnake/subscription.py +++ b/disnake/subscription.py @@ -91,7 +91,9 @@ def __init__(self, *, data: SubscriptionPayload, state: ConnectionState) -> None self.sku_ids: List[int] = list(map(int, data["sku_ids"])) self.entitlement_ids: List[int] = list(map(int, data["entitlement_ids"])) self.renewal_sku_ids: Optional[List[int]] = ( - list(map(int, data["renewal_sku_ids"])) if data["renewal_sku_ids"] else None + list(map(int, renewal_sku_ids)) + if (renewal_sku_ids := data.get("renewal_sku_ids")) is not None + else None ) self.current_period_start: datetime.datetime = parse_time(data["current_period_start"]) self.current_period_end: datetime.datetime = parse_time(data["current_period_end"])