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
|
@ -102,6 +102,7 @@ def _finalize_traitement(request, demande, proposals, proposed_for,
|
||||||
'style="width:99%; height: 90px;">'
|
'style="width:99%; height: 90px;">'
|
||||||
'</textarea>'
|
'</textarea>'
|
||||||
})
|
})
|
||||||
|
if errors is not None:
|
||||||
for error in errors:
|
for error in errors:
|
||||||
messages.error(request, error)
|
messages.error(request, error)
|
||||||
return render(request, "gestioncof/traitement_demande_petit_cours.html",
|
return render(request, "gestioncof/traitement_demande_petit_cours.html",
|
||||||
|
|
Loading…
Reference in a new issue