Skip to content

Commit

Permalink
Fix reference to annotation_set
Browse files Browse the repository at this point in the history
  • Loading branch information
jayvarner committed Jan 29, 2024
1 parent c9cbb71 commit 2e1793e
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
3 changes: 2 additions & 1 deletion readux_ingest_ecds/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

Manifest = get_iiif_models()['Manifest']
Canvas = get_iiif_models()['Canvas']
OCR = get_iiif_models()['OCR']

app = Celery('readux_ingest_ecds', result_extended=True)
app.config_from_object('django.conf:settings')
Expand Down Expand Up @@ -46,5 +47,5 @@ def add_ocr_task(manifest_id, *args, **kwargs):
# The add_ocr_annotations method uses bulk_create() which does not call save() on the model.
# Calling save() is really slow and I don't know why. Calling save() after the annotation
# has been created, calling save is as fast as expected.
[ocr.save() for ocr in canvas.annotation_set.all()]
[ocr.save() for ocr in OCR.objects.filter(canvas=canvas)]
canvas.save() # trigger reindex
Binary file removed test_app/tmp/metadata.zip
Binary file not shown.
2 changes: 0 additions & 2 deletions test_app/tmp/metadata/metadata.csv

This file was deleted.

0 comments on commit 2e1793e

Please sign in to comment.