Skip to content

Commit

Permalink
Fix show TN book intro bug
Browse files Browse the repository at this point in the history
* Set SHOW_TN_BOOK_INTRO in .env to true
* Fix bug in parsing module where parsing of tn content was not
sharing the settings.SHOW_TN_BOOK_INTRO variable for use in
conditional inclusion of TN book intros, but instead was using its own
local boolean for the same purpose - thus changes to config in
settings was not having an effect.
  • Loading branch information
linearcombination committed Dec 12, 2024
1 parent 7774f5e commit 543bea7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ USE_GIT_CLI=true

# Content team doesn't want TN book intros to show in DOC.
# future, if desired we could have them show by sleec
SHOW_TN_BOOK_INTRO=false
SHOW_TN_BOOK_INTRO=true

# If true, then check USFM content for certain USFM structural defects
# and attempt a fix so that the USFM can then be parsed.
Expand Down
4 changes: 2 additions & 2 deletions backend/document/domain/parsing.py
Original file line number Diff line number Diff line change
Expand Up @@ -779,7 +779,7 @@ def tn_book_content(
resource_dir: str,
resource_requests: Sequence[ResourceRequest],
layout_for_print: bool,
include_tn_book_intros: bool = False,
show_tn_book_intro: bool = settings.SHOW_TN_BOOK_INTRO,
) -> TNBook:
chapter_verses = tn_chapter_verses(
resource_dir,
Expand All @@ -788,7 +788,7 @@ def tn_book_content(
resource_requests,
)
book_intro = ""
if include_tn_book_intros:
if show_tn_book_intro:
book_intro = book_intro_markdown(resource_dir, resource_lookup_dto.book_code)
if book_intro:
book_intro = markdown_transformer.remove_sections(book_intro)
Expand Down

0 comments on commit 543bea7

Please sign in to comment.