zilencer: Fix audit log handling of missing 0s.

This commit is contained in:
Tim Abbott
2023-12-05 23:59:01 -08:00
parent 2c7afa19ba
commit 731799b726

View File

@@ -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