enhanced update doc ending

This commit is contained in:
2017-08-28 16:31:55 +02:00
parent 86781cd443
commit ea3c4468f2

View File

@@ -178,7 +178,10 @@ def doc_edit(request):
if len(intitule) > 0 and len(texte) > 0: if len(intitule) > 0 and len(texte) > 0:
update_doc(request, doc_id, intitule, texte, theme) update_doc(request, doc_id, intitule, texte, theme)
return HTTPFound(location=request.route_url('doc_list')) if doc_id <> '0':
return HTTPFound(location=request.route_url('doc_view', doc_id=doc_id))
else:
return HTTPFound(location=request.route_url('doc_list'))
else: else:
message = "Veuillez saisir un intitule et un texte." message = "Veuillez saisir un intitule et un texte."