From 29afd0ceb38ef438db3a2e7f23fe7ad11e713941 Mon Sep 17 00:00:00 2001 From: a_tanaka Date: Thu, 19 Aug 2021 09:30:10 +0900 Subject: [PATCH] Fix: FCMClient is initialized even if FCM is not configured --- pushservices/bootstrap.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pushservices/bootstrap.py b/pushservices/bootstrap.py index 49c8cdf..e440a7f 100644 --- a/pushservices/bootstrap.py +++ b/pushservices/bootstrap.py @@ -25,7 +25,7 @@ def init_messaging_agents(masterdb): appname = app["shortname"] """ FCMClient setup """ services["fcm"][appname] = [] - if KEY_FCM_JSON_KEY in app and KEY_FCM_PROJECT_ID in app: + if app.get(KEY_FCM_JSON_KEY) and app.get(KEY_FCM_PROJECT_ID): try: fcminstance = FCMClient( project_id=app[KEY_FCM_PROJECT_ID],