1
0
forked from ScoDoc/ScoDoc

Desactive upload referentiels competences en prod.

This commit is contained in:
Emmanuel Viennet 2022-11-01 09:26:30 +01:00
parent 8b97695f53
commit 2acdb8191f

View File

@ -14,8 +14,6 @@ from flask_login import current_user
from werkzeug.utils import redirect
from werkzeug.utils import secure_filename
from config import Config
from app import db
from app import log
@ -218,6 +216,9 @@ def refcomp_load(formation_id=None):
log(f"refcomp_load: ignoring {filename} (already loaded)")
form = RefCompLoadForm()
if current_app and not current_app.config["DEBUG"]:
form.upload.render_kw = {"disabled": "disabled"}
form.referentiel_standard.choices = [
(r["id"], f"{r['specialite']} ({r['created']}-{r['serial']})")
for r in refs_distrib_dict