Skip to content

Commit

Permalink
Merge pull request #1506 from laws-africa/bug-fix-key-error
Browse files Browse the repository at this point in the history
Guard for handling invalid months
  • Loading branch information
nickmwangemi authored Sep 5, 2023
2 parents 0f4843a + ce57237 commit 63b4a27
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions peachjam/views/courts.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,9 @@ def get_context_data(self, **kwargs):
context["grouped_documents"] = self.grouped_judgments(context["documents"])

if "year" in self.kwargs:

context["year"] = self.kwargs["year"]

if "month" in self.kwargs:
if "month" in self.kwargs and self.kwargs["month"] in set(range(1, 13)):
context["month"] = MONTHS[self.kwargs["month"]]
context[
"formatted_court_name"
Expand Down

0 comments on commit 63b4a27

Please sign in to comment.