Skip to content

Commit 622d554

Browse files
authored
fix MOM download bug (#1009)
1 parent e1acc4a commit 622d554

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ Instructions: Add a subsection under `[Unreleased]` for additions, fixes, change
1515

1616
### Fixed
1717

18+
- Bug that caused MyOpenMath problems to be downloaded on every build, regardless of whether they were needed.
1819
- Bug which caused error in `pretext view` when the `running_servers` file contained a blank line.
1920

2021
## [2.20.0] - 2025-06-20

pretext/project/__init__.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -547,17 +547,18 @@ def ensure_myopenmath_xml(self) -> None:
547547

548548
for prob_num in mom_prob_nums:
549549
assert isinstance(prob_num, str)
550+
log.debug(f"Checking for MyOpenMath problem {prob_num}")
550551
if not (
551-
self.generated_dir_abspath() / "problems" / f"{prob_num}.xml"
552+
self.generated_dir_abspath() / "problems" / f"mom-{prob_num}.xml"
552553
).exists():
553554
log.debug(
554555
f"MyOpenMath problem {prob_num} does not exist, generating"
555556
)
556557
self.generate_assets(
557558
requested_asset_types=["myopenmath"], only_changed=False
558559
)
559-
# Only need to generate once a single missing file is discovered.
560-
break
560+
# Only need to generate once a single missing file is discovered.
561+
break
561562
else:
562563
log.debug("Source does not contain myopenmath problems")
563564

0 commit comments

Comments
 (0)