diff --git a/readux_ingest_ecds/tasks.py b/readux_ingest_ecds/tasks.py index 98fa1dd..14bffcd 100644 --- a/readux_ingest_ecds/tasks.py +++ b/readux_ingest_ecds/tasks.py @@ -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') @@ -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 diff --git a/test_app/tmp/metadata.zip b/test_app/tmp/metadata.zip deleted file mode 100644 index bee3de7..0000000 Binary files a/test_app/tmp/metadata.zip and /dev/null differ diff --git a/test_app/tmp/metadata/metadata.csv b/test_app/tmp/metadata/metadata.csv deleted file mode 100644 index a29d365..0000000 --- a/test_app/tmp/metadata/metadata.csv +++ /dev/null @@ -1,2 +0,0 @@ -PID,Label,Summary,Author,Published city,Published date,Publisher,PDF -t9wtf-sample,t9wtf-sample,x,x,x,x,x,www.google.com \ No newline at end of file