forked from DGNum/gestioCOF
Handle errors=None
in _finalize_traitement
Sometimes the `errors` variable is `None` in `_finalize_traitement`. It was not an issue when it was just used in the templates but now we have to handle this in the view. Basically, we shall consider it is an empty list when it occurs.
This commit is contained in:
parent
c37754376b
commit
98abe71681
1 changed files with 3 additions and 2 deletions
|
@ -102,8 +102,9 @@ def _finalize_traitement(request, demande, proposals, proposed_for,
|
||||||
'style="width:99%; height: 90px;">'
|
'style="width:99%; height: 90px;">'
|
||||||
'</textarea>'
|
'</textarea>'
|
||||||
})
|
})
|
||||||
for error in errors:
|
if errors is not None:
|
||||||
messages.error(request, error)
|
for error in errors:
|
||||||
|
messages.error(request, error)
|
||||||
return render(request, "gestioncof/traitement_demande_petit_cours.html",
|
return render(request, "gestioncof/traitement_demande_petit_cours.html",
|
||||||
{"demande": demande,
|
{"demande": demande,
|
||||||
"unsatisfied": unsatisfied,
|
"unsatisfied": unsatisfied,
|
||||||
|
|
Loading…
Reference in a new issue