Skip to content

Commit 7bc1fa5

Browse files
committed
GameSetPick results must be accessed by the picker group
1 parent 79f312f commit 7bc1fa5

File tree

3 files changed

+12
-13
lines changed

3 files changed

+12
-13
lines changed

src/picker/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
__version__ = "3.0.1"
1+
__version__ = "3.1.0"
22
VERSION = tuple(int(i) for i in __version__.split("."))
33

44
default_app_config = "picker.apps.PickerConfig"

src/picker/models/picks.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -558,10 +558,10 @@ def get_score(value):
558558
games_to_update = all_games
559559
else:
560560
games_to_update = [
561-
g
562-
for g in all_games
563-
if g.home and (g.home.abbr in completed) and g.status == g.Status.UNPLAYED
564-
]
561+
g
562+
for g in all_games
563+
if g.home and (g.home.abbr in completed) and g.status == g.Status.UNPLAYED
564+
]
565565

566566
for game in games_to_update:
567567
result = completed.get(game.home.abbr, None)

src/picker/views/picks.py

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -103,15 +103,14 @@ class ResultsByWeek(ResultsBase):
103103
template_name = "@results/results.html"
104104

105105
def get_context_data(self, **kwargs):
106-
return super().get_context_data(
107-
gameset=get_object_or_404(
108-
GameSetPicks,
109-
league=self.league,
110-
season=self.season,
111-
sequence=self.kwargs["sequence"],
112-
),
113-
**kwargs,
106+
gameset = get_object_or_404(
107+
GameSetPicks,
108+
league=self.league,
109+
season=self.season,
110+
sequence=self.kwargs["sequence"],
114111
)
112+
results = gameset.results(self.group)
113+
return super().get_context_data(gameset=gameset, results=results, **kwargs)
115114

116115

117116
# Picks

0 commit comments

Comments
 (0)