Fix: moduleimpl_status ordre des partitions

This commit is contained in:
viennet 2020-12-26 00:39:45 +01:00
parent ea388ea494
commit 0864917a5f

View File

@ -262,7 +262,11 @@ def moduleimpl_status(context, moduleimpl_id=None, partition_id=None, REQUEST=No
H.append(
"""Afficher les groupes de&nbsp;<select name="partition_id" onchange="document.f.submit();">"""
)
been_selected = False
for partition in partitions:
if not partition_id and not been_selected:
selected = "selected"
been_selected = True
if partition["partition_id"] == partition_id:
selected = "selected"
else:
@ -270,8 +274,6 @@ def moduleimpl_status(context, moduleimpl_id=None, partition_id=None, REQUEST=No
name = partition["partition_name"]
if name is None:
name = "Tous"
if not partition_id:
selected = "selected"
H.append(
"""<option value="%s" %s>%s</option>"""
% (partition["partition_id"], selected, name)