Skip to content

Commit

Permalink
Jira link builder now correctly handles absent NCNs
Browse files Browse the repository at this point in the history
  • Loading branch information
jacksonj04 committed Dec 19, 2024
1 parent 37a2e9f commit 8a5eeda
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion judgments/utils/link_generators.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

if TYPE_CHECKING:
from caselawclient.models.documents import Document
from caselawclient.models.identifiers import Identifier
from django.http import HttpRequest


Expand Down Expand Up @@ -85,7 +86,7 @@ def build_jira_create_link(document: Document, request: HttpRequest) -> str:
reverse("full-text-html", kwargs={"document_uri": document.uri}),
)

preferred_ncn = document.identifiers.preferred(type=NeutralCitationNumber)
preferred_ncn: Identifier | None = document.identifiers.preferred(type=NeutralCitationNumber)

description_string = "{editor_html_url}".format(
editor_html_url="""{html_url}
Expand Down

0 comments on commit 8a5eeda

Please sign in to comment.