Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

72 update to api will cause issue with group user call statistics #116

Conversation

LivCurtis
Copy link
Contributor

No description provided.

Odin had changed the GET Users Stats method so that if no calls are made to the given user, it returns an empty list. This caused an error in the group_users_call_statistics since in the method we try to access a key in the dictionary and if this is an empty list, the script will error. I updated the method so that if get.users_stats returns an empty list, we assign it to a dict and assign 0s to the variables
@LivCurtis LivCurtis linked an issue Sep 19, 2024 that may be closed by this pull request
Copy link
Owner

@Jordan-Prescott Jordan-Prescott left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thinking about it we don't actually need the replace_none_with_0 anymore if you just set the record to have 0 in them.

Can you remove this method from the class and the script itself and update your code to set to 0 in user_statistics instead of None.

Replaced None with 0 for the user_statistics dict . replace_none_with_0 method no longer required so removed this from the same file as well as report_entities.py
Copy link
Owner

@Jordan-Prescott Jordan-Prescott left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All good.

@Jordan-Prescott Jordan-Prescott merged commit f73059c into main Sep 23, 2024
@Jordan-Prescott Jordan-Prescott deleted the 72-update-to-api-will-cause-issue-with-group-user-call-statistics branch September 23, 2024 13:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update to API will cause issue with Group User Call Statistics
2 participants