Skip to content

Commit

Permalink
Remove folio_numbers var from index_manuscript_mei
Browse files Browse the repository at this point in the history
  • Loading branch information
dchiller committed May 22, 2024
1 parent 4accc61 commit e327179
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ def handle(self, *args: Any, **options: Any) -> None:
"number", "image_uri"
)
)
folio_numbers = folio_map.keys()
if not folio_map:
raise ValueError(f"No folios found for manuscript {manuscript_id}.")
manuscript_mei_path = path.join(options["mei_dir"], str(manuscript_id))
Expand All @@ -83,7 +82,7 @@ def handle(self, *args: Any, **options: Any) -> None:
raise FileNotFoundError(f"No MEI files found in {manuscript_mei_path}.")
for mei_file in manuscript_mei_files:
folio_number: str = mei_file.split("_")[-1].split(".")[0]
if not folio_number in folio_numbers:
if not folio_number in folio_map:
raise ValueError(
f"Folio number {folio_number} in MEI file {mei_file} does not exist in the database."
)
Expand Down

0 comments on commit e327179

Please sign in to comment.