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

Revise scrimmage creation #184

Merged
merged 63 commits into from
Jan 5, 2021
Merged

Revise scrimmage creation #184

merged 63 commits into from
Jan 5, 2021

Conversation

n8kim1
Copy link
Contributor

@n8kim1 n8kim1 commented Dec 30, 2020

does a crazy amount of things, to simplify codebase and patch out some bugs. For #126, #42.

create_scrimmage_helper, accept_scrimmage_helper do the bulk of all the scrimmage creation work.
The same endpoints that created scrimmages still do so. But now they just tease out arguments, and pass it to these methods.

Tournament matches are now unranked, as intended; other misc bugfixes.
Sets tournament_id of standard matches to -1 (better design for later)
Also changes some models, because we need some new statuses of scrimmages, and need to save a scrimmage's maps for info transfer once it goes from created to accepted.

Remaining TODOs here are all for speeding up code -- they don't change functionality. leaving that for a future time

@n8kim1 n8kim1 changed the base branch from master to webinfra January 1, 2021 18:04
@n8kim1 n8kim1 force-pushed the webinfra-scrimmage-better branch from f7e5663 to 5523ce0 Compare January 3, 2021 05:30
@n8kim1 n8kim1 force-pushed the webinfra-scrimmage-better branch from 58819be to b80780d Compare January 4, 2021 02:50
@n8kim1 n8kim1 changed the title Simplify scrimmage creation methods Revise scrimmage creation Jan 4, 2021
@n8kim1 n8kim1 requested review from j-mao and opheez January 4, 2021 12:38
@n8kim1 n8kim1 marked this pull request as ready for review January 4, 2021 12:40
Comment on lines +87 to +88
red_submission_id = red_team_sub.last_1_id
blue_submission_id = blue_team_sub.last_1_id
Copy link
Contributor Author

Choose a reason for hiding this comment

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

store these in db

Comment on lines 135 to 136
red_submission_id = TeamSubmission.objects.get(pk=red_team_id).last_1_id
blue_submission_id = TeamSubmission.objects.get(pk=blue_team_id).last_1_id
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this is bad: won't work for tours.
after sub ids are stored in db, get them from there

@n8kim1 n8kim1 merged commit 53bb11e into webinfra Jan 5, 2021
@n8kim1 n8kim1 deleted the webinfra-scrimmage-better branch January 5, 2021 23:23
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.

2 participants