diff --git a/app/cmd/db.py b/app/cmd/db.py index 96ffc68..c5cc6f5 100644 --- a/app/cmd/db.py +++ b/app/cmd/db.py @@ -99,6 +99,11 @@ def _create_doc(folder: str)-> None: # query on table institution with 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,