Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add levels #1418

Merged
merged 1 commit into from
Aug 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading