diff --git a/app/entreprises/routes.py b/app/entreprises/routes.py index db42affe6..12309d58a 100644 --- a/app/entreprises/routes.py +++ b/app/entreprises/routes.py @@ -75,18 +75,21 @@ def fiche_entreprise(id): offres = entreprise.offres offres_with_files = [] for offre in offres: + files = [] path = os.path.join( - Config.SCODOC_VAR_DIR, "entreprises", f"{entreprise.id}", f"{offre.id}" + Config.SCODOC_VAR_DIR, + "entreprises", + f"{offre.entreprise_id}", + f"{offre.id}", ) if os.path.exists(path): - files = [] for dir in glob.glob( f"{path}/[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]-[0-9][0-9]-[0-9][0-9]-[0-9][0-9]" ): for file in glob.glob(f"{dir}/*"): file = [os.path.basename(dir), os.path.basename(file)] files.append(file) - offres_with_files.append([offre, files]) + offres_with_files.append([offre, files]) contacts = entreprise.contacts logs = ( EntrepriseLog.query.order_by(EntrepriseLog.date.desc()) diff --git a/app/templates/entreprises/ajout_entreprise.html b/app/templates/entreprises/ajout_entreprise.html index 6b0ba311e..4a70e83d5 100644 --- a/app/templates/entreprises/ajout_entreprise.html +++ b/app/templates/entreprises/ajout_entreprise.html @@ -1,12 +1,6 @@ {% extends 'base.html' %} {% import 'bootstrap/wtf.html' as wtf %} -{% block styles %} -{{super()}} - - -{% endblock %} - {% block app_content %}