Skip to content
Snippets Groups Projects

Allow extracting elements holding transcriptions without entities

Merged Eva Bardou requested to merge extract-page-without-entities into main
All threads resolved!
+ 2
6
@@ -435,14 +435,10 @@ def test_extract_transcription_no_translation(mock_database, tokens):
element = Element.get_by_id("test-page_1-line_1")
# Deleting one of the two transcriptions from the element
transcription = Transcription.get(
Transcription.get(
Transcription.element == element,
Transcription.worker_version_id == "worker_version_id",
)
TranscriptionEntity.delete().where(
TranscriptionEntity.transcription == transcription
).execute()
transcription.delete_instance()
).delete_instance(recursive=True)
# Deleting all entities on the element remaining transcription while leaving the transcription intact
if tokens:
Loading