Skip to content

Commit 2b8e0f8

Browse files
author
Andrey
committed
Add fix
1 parent 6879c49 commit 2b8e0f8

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

spire/journal/actions.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -612,9 +612,9 @@ async def get_journal_entries(
612612
return query.all()
613613

614614

615-
async def _get_journal_entry(
615+
async def get_journal_entry(
616616
db_session: Session, journal_entry_id: UUID
617-
) -> JournalEntry:
617+
) -> Optional[JournalEntry]:
618618
"""
619619
Returns a journal entry by its id. Raises a JournalEntryNotFound error if no such entry is
620620
found in the database.

spire/journal/api.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1280,7 +1280,7 @@ async def update_entry_content(
12801280
es_index = journal.search_index
12811281

12821282
try:
1283-
journal_entry = await actions._get_journal_entry(
1283+
journal_entry = await actions.get_journal_entry(
12841284
db_session=db_session, journal_entry_id=entry_id
12851285
)
12861286
if journal_entry is None:
@@ -1801,7 +1801,7 @@ async def create_tags(
18011801

18021802
if es_index is not None:
18031803
try:
1804-
journal_entry = await actions._get_journal_entry(
1804+
journal_entry = await actions.get_journal_entry(
18051805
db_session=db_session, journal_entry_id=entry_id
18061806
)
18071807
assert journal_entry != None
@@ -1951,7 +1951,7 @@ async def update_tags(
19511951

19521952
if es_index is not None:
19531953
try:
1954-
journal_entry = await actions._get_journal_entry(
1954+
journal_entry = await actions.get_journal_entry(
19551955
db_session=db_session, journal_entry_id=entry_id
19561956
)
19571957
assert journal_entry != None
@@ -2047,7 +2047,7 @@ async def delete_tag(
20472047

20482048
if es_index is not None:
20492049
try:
2050-
journal_entry = await actions._get_journal_entry(
2050+
journal_entry = await actions.get_journal_entry(
20512051
db_session=db_session, journal_entry_id=entry_id
20522052
)
20532053
assert journal_entry != None

0 commit comments

Comments
 (0)