Skip to content

Commit

Permalink
Fix incorrect way of getting whether the document is published
Browse files Browse the repository at this point in the history
Document.is_published() or api_client.get_published()
  • Loading branch information
dragon-dxw committed Jun 5, 2024
1 parent 9cdfa66 commit 0828a55
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions ds-caselaw-ingester/lambda_function.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
)
from caselawclient.client_helpers import VersionAnnotation, VersionType
from caselawclient.errors import DocumentNotFoundError
from caselawclient.models.documents import Document
from dotenv import load_dotenv
from notifications_python_client.notifications import NotificationsAPIClient

Expand Down Expand Up @@ -496,7 +495,7 @@ def process_message(message):
is_akoma = xml.tag == "{http://docs.oasis-open.org/legaldocml/ns/akn/3.0}akomaNtoso"

try:
target_published = Document(uri, api_client).get_published()
target_published = api_client.get_published(uri)
except DocumentNotFoundError: # the target does not exist
target_published = False

Expand Down

0 comments on commit 0828a55

Please sign in to comment.