Skip to content

Commit

Permalink
Merge pull request #55 from junho100/master
Browse files Browse the repository at this point in the history
Update dictionary key check
  • Loading branch information
andy000923 authored Aug 19, 2024
2 parents 88283da + 8383de8 commit ca46e1e
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/plugin/manager/email/category_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def create_cloud_service(self, secret_data):
category_connector = CategoryConnector()

categories = []
if hasattr(secret_data, "email_secret_key"):
if "email_secret_key" in secret_data:
categories = category_connector.list_categories(secret_data.get("app_key"), secret_data.get("email_secret_key"))

for category in categories:
Expand Down
2 changes: 1 addition & 1 deletion src/plugin/manager/email/tag_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def create_cloud_service(self, secret_data):
tag_connector = TagConnector()

tags = []
if hasattr(secret_data, "email_secret_key"):
if "email_secret_key" in secret_data:
tags = tag_connector.list_tags(secret_data.get("app_key"), secret_data.get("email_secret_key"))

for tag in tags:
Expand Down
2 changes: 1 addition & 1 deletion src/plugin/manager/email/template_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def create_cloud_service(self, secret_data):
template_connector = TemplateConnector()

templates = []
if hasattr(secret_data, "email_secret_key"):
if "email_secret_key" in secret_data:
templates = template_connector.list_templates(secret_data.get("app_key"), secret_data.get("email_secret_key"))

for template in templates:
Expand Down
2 changes: 1 addition & 1 deletion src/plugin/manager/push/tag_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def create_cloud_service(self, secret_data):
tag_connector = PushTagConnector()

tags = []
if hasattr(secret_data, "push_secret_key"):
if "push_secret_key" in secret_data:
tags = tag_connector.list_tags(secret_data.get("app_key"), secret_data.get("push_secret_key"))

for tag in tags:
Expand Down
2 changes: 1 addition & 1 deletion src/plugin/manager/push/token_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def create_cloud_service(self, secret_data):
token_connector = PushTokenConnector()

tokens = []
if hasattr(secret_data, "push_secret_key"):
if "push_secret_key" in secret_data:
tokens = token_connector.list_tokens(secret_data.get("app_key"), secret_data.get("push_secret_key"))

for token in tokens:
Expand Down

0 comments on commit ca46e1e

Please sign in to comment.