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

Remove bye from match slips #48

Merged
merged 2 commits into from
Jul 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions taw/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ def home():

if request.form["action"] == "match_slips":
pairings = form.parsed_pairings
# Filter out the bye before sorting:
pairings = [pairing for pairing in pairings if not pairing.player_2.is_bye]
# We want to print five match slips per page, and we want
# them to in the "correct" order when we use the paper cutter
pairings = sort_pairings_for_paper_cutter(
Expand Down
6 changes: 3 additions & 3 deletions taw/testing/outputs/match_slips_pairings_with_bye.html
Original file line number Diff line number Diff line change
Expand Up @@ -962,7 +962,7 @@

<div class="container-fluid match-slip-container" style="position:relative">
<div class="row">
<div class="col-2 d-flex justify-content-start"><b>Table #12</b></div>
<div class="col-2 d-flex justify-content-start"><b>Table #</b></div>
<div class="col-2 d-flex justify-content-center">

</div>
Expand All @@ -981,7 +981,7 @@

<div class="row my-2 match-slip__p1-infos">
<div class="col-5 match-slip__name">
Georges Pompidou (0 pts)
</div>
<div class="col-2 signature">
<div class="match-slip__signature-label">PLAYER 1</div>
Expand All @@ -1005,7 +1005,7 @@

<div class="row my-2 match-slip__p2-infos">
<div class="col-5 match-slip__name">
* * * BYE * * * (0 pts)
</div>
<div class="col-2 signature">
<div class="match-slip__signature-label">PLAYER 2</div>
Expand Down