@ -99,6 +99,11 @@ def _create_doc(folder: str)-> None:
# query on table institution with <doc_archives> to get the correspondant institution key
inst_query = [t.id_institution for t in Institution.select().where(
Institution.full_label == doc_archives)]
try:
inst_query[0]
except IndexError:
print("!! Add", doc_archives, "to /app/data_actes/institution_data.py")
break
infos_doc.append({
"inst_doc": inst_query[0],
"collection_doc": doc_cote,