From c1e8b6d0ff11b48359542f716f7a42823fb41b11 Mon Sep 17 00:00:00 2001 From: jxxghp Date: Fri, 14 Jul 2023 08:18:37 +0800 Subject: [PATCH] fix bugs --- app/api/endpoints/message.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/api/endpoints/message.py b/app/api/endpoints/message.py index 2cb64cac..bdf683bb 100644 --- a/app/api/endpoints/message.py +++ b/app/api/endpoints/message.py @@ -74,7 +74,9 @@ def read_switchs(db: Session = Depends(get_db), if not switchs: for noti in NotificationType: return_list.append(NotificationSwitch(mtype=noti.value, wechat=True, telegram=True, slack=True)) - + else: + for switch in switchs: + return_list.append(NotificationSwitch(**switch)) return return_list