Skip to content

Commit

Permalink
Add levels
Browse files Browse the repository at this point in the history
  • Loading branch information
nickmwangemi committed Jul 31, 2023
1 parent b28a9b6 commit a316b64
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion peachjam/models/generic_document.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,8 @@ def search_penalty(self):
def apply_labels(self):
# label to indicate that this legislation is repealed
label, _ = Label.objects.get_or_create(
code="repealed", defaults={"name": "Repealed", "code": "repealed"}
code="repealed",
defaults={"name": "Repealed", "code": "repealed", "level": "danger"},
)
# apply label if repealed
if self.repealed:
Expand Down
2 changes: 1 addition & 1 deletion peachjam/models/judgment.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ def apply_labels(self):
# label showing that a judgment is cited/reported in law reports, hence "more important"
label, _ = Label.objects.get_or_create(
code="reported",
defaults={"name": "Reported", "code": "reported"},
defaults={"name": "Reported", "code": "reported", "level": "success"},
)

# if the judgment has alternative_names, apply the "reported" label
Expand Down

0 comments on commit a316b64

Please sign in to comment.