Skip to content
Snippets Groups Projects
Commit 326f4b98 authored by Erwan Rouchet's avatar Erwan Rouchet
Browse files

Fix the fixed migration fix

parent f43c2358
No related branches found
No related tags found
1 merge request!18Transcription search
......@@ -62,7 +62,7 @@ class TranscriptionSearch(ListAPIView):
def list(self, request):
query = self.request.query_params.get('q')
if not query:
return
return Response("", status=status.HTTP_204_NO_CONTENT)
search_results = search_transcriptions(query)
if search_results is None:
return Response("", status=status.HTTP_204_NO_CONTENT)
......
......@@ -14,7 +14,7 @@ def transcription_to_document(apps, schema_editor):
if percent % 5 == 0 and last != percent:
print(' > {}% => {} / {}'.format(percent, i, nb))
last = percent
doc = Document.objects.create(type=DocumentType.Transcription, name="Transcription '{}'".format(ts.text))
doc = Document.objects.create(id=ts.id, type=DocumentType.Transcription, name="Transcription '{}'".format(ts.text))
doc.zones.add(ts.zone)
ts.document_ptr_id = doc.id
ts.save()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment