Skip to content

Commit b41c0a5

Browse files
fix(notification): handle case of empty tokens in user token import
1 parent cfb20ca commit b41c0a5

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

raven_cloud/api/notification.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -477,6 +477,12 @@ def import_user_tokens(site_name: str, tokens: str):
477477
if isinstance(tokens, str):
478478
tokens = json.loads(tokens)
479479

480+
# if no tokens are present, return
481+
if not tokens:
482+
return {
483+
"status": "success",
484+
}
485+
480486
check_if_site_exists(site_name)
481487

482488
# building an incoming set for faster lookup

0 commit comments

Comments
 (0)