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

Rating service also creates default ratings #751

Closed
Askaholic opened this issue Mar 29, 2021 · 0 comments · Fixed by #757
Closed

Rating service also creates default ratings #751

Askaholic opened this issue Mar 29, 2021 · 0 comments · Fixed by #757
Labels

Comments

@Askaholic
Copy link
Collaborator

We want 2v2 rating to be initialized from global rating. This happens here for the purposes of matchmaking:

if key == "tmm_2v2" and key not in self:

However, it seems that when games get rated, the default rating is created by the rating service, which doesn't have any logic for using a different rating as a base:

async def _create_default_rating(

It would be ideal if we could refactor the duplication of rating initialization so we don't have to have 2 implementations. We also need unit tests that check the values written to the database after a game.

@Askaholic Askaholic added the bug label Mar 29, 2021
Askaholic added a commit that referenced this issue Apr 1, 2021
* Fix wrong variable name

* Add failing test

* Add tmm rating initialization to rating service
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant