better variant sorting
This commit is contained in:
parent
0e0bb06780
commit
45300c1779
2 changed files with 4 additions and 3 deletions
|
@ -335,6 +335,7 @@ def get_variant_rows() -> List[VariantRow]:
|
||||||
" SELECT DISTINCT ON (variants.id, variant_base_ratings.num_players)"
|
" SELECT DISTINCT ON (variants.id, variant_base_ratings.num_players)"
|
||||||
" variants.id,"
|
" variants.id,"
|
||||||
" variants.num_suits,"
|
" variants.num_suits,"
|
||||||
|
" variants.clue_starved,"
|
||||||
" name,"
|
" name,"
|
||||||
" variant_base_ratings.num_players,"
|
" variant_base_ratings.num_players,"
|
||||||
" COALESCE(variant_ratings.value_after, variant_base_ratings.rating) AS current_rating "
|
" COALESCE(variant_ratings.value_after, variant_base_ratings.rating) AS current_rating "
|
||||||
|
@ -354,8 +355,8 @@ def get_variant_rows() -> List[VariantRow]:
|
||||||
" ON games.variant_id = ratings.id AND games.num_players = ratings.num_players "
|
" ON games.variant_id = ratings.id AND games.num_players = ratings.num_players "
|
||||||
"LEFT OUTER JOIN game_statistics"
|
"LEFT OUTER JOIN game_statistics"
|
||||||
" ON games.id = game_statistics.game_id "
|
" ON games.id = game_statistics.game_id "
|
||||||
"GROUP BY (ratings.id, ratings.name, ratings.num_players, ratings.current_rating)"
|
"GROUP BY (ratings.id, ratings.name, ratings.clue_starved, ratings.num_players, ratings.current_rating, ratings.num_suits)"
|
||||||
"ORDER BY (ratings.id, ratings.num_players)"
|
"ORDER BY (ratings.clue_starved, ratings.num_suits, ratings.num_players)"
|
||||||
""
|
""
|
||||||
)
|
)
|
||||||
return [
|
return [
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
</li>
|
</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link" id="Back" href="/">Back to Main Site</a>
|
<a class="nav-link" id="Back" href="/">Back</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue