From 54d221cdfe22b6f31d1729cf2c33886ab15dbf97 Mon Sep 17 00:00:00 2001 From: lucasheld Date: Sun, 18 Sep 2022 14:49:10 +0200 Subject: [PATCH] fix: convert monitor notificationIDList only once --- uptime_kuma_api/api.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/uptime_kuma_api/api.py b/uptime_kuma_api/api.py index 33d959d..5f12a84 100644 --- a/uptime_kuma_api/api.py +++ b/uptime_kuma_api/api.py @@ -33,7 +33,8 @@ def gen_secret(length: int) -> str: def _convert_monitor_return(monitor): - monitor["notificationIDList"] = [int(i) for i in monitor["notificationIDList"].keys()] + if type(monitor["notificationIDList"]) == dict: + monitor["notificationIDList"] = [int(i) for i in monitor["notificationIDList"].keys()] def _convert_monitor_input(kwargs):