From 731799b726abd2f12d70780cc46b26fa872ed057 Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Tue, 5 Dec 2023 23:59:01 -0800 Subject: [PATCH] zilencer: Fix audit log handling of missing 0s. --- zilencer/models.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zilencer/models.py b/zilencer/models.py index e98216afab..124294e86d 100644 --- a/zilencer/models.py +++ b/zilencer/models.py @@ -388,9 +388,9 @@ def get_remote_server_guest_and_non_guest_count( ] for role_type in UserProfile.ROLE_TYPES: if role_type == UserProfile.ROLE_GUEST: - guest_count += humans_count_dict[str(role_type)] + guest_count += humans_count_dict.get(str(role_type), 0) else: - non_guest_count += humans_count_dict[str(role_type)] + non_guest_count += humans_count_dict.get(str(role_type), 0) return RemoteCustomerUserCount( non_guest_user_count=non_guest_count, guest_user_count=guest_count