Skip to content

Commit

Permalink
Merge pull request #13164 from PennyDreadfulMTG/competition-metagame
Browse files Browse the repository at this point in the history
Only show archetype table once on competition detail page
  • Loading branch information
mergify[bot] committed Sep 29, 2024
2 parents 4523749 + d7537b1 commit 1911613
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions decksite/templates/competition.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
{{> liveleaderboardtable}}
</section>
{{/has_leaderboard}}
{{#archetypes}}
{{#show_archetype_tree}}
<section>
<h2>Archetypes</h2>
{{> archetypetree}}
</section>
{{/archetypes}}
{{/show_archetype_tree}}
1 change: 1 addition & 0 deletions decksite/views/competition.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ def __init__(self, competition: Comp, archetypes: list[Archetype]) -> None:
self.has_leaderboard = True
self.date = dtutil.display_date(competition.start_date)
self.archetypes = archetypes
self.show_archetype_tree = len(self.archetypes) > 0

def __getattr__(self, attr: str) -> Any:
return getattr(self.competition, attr)
Expand Down

0 comments on commit 1911613

Please sign in to comment.