1
0
forked from ScoDoc/ScoDoc

fix: partition_name when numeric

This commit is contained in:
Emmanuel Viennet 2021-10-15 14:31:11 +02:00
parent e8e3423193
commit 93a23ff112

View File

@ -791,7 +791,7 @@ def partition_create(
if not sco_permissions_check.can_change_groups(formsemestre_id):
raise AccessDenied("Vous n'avez pas le droit d'effectuer cette opération !")
if partition_name:
partition_name = partition_name.strip()
partition_name = str(partition_name).strip()
if default:
partition_name = None
if not partition_name and not default:
@ -1106,7 +1106,7 @@ def partition_rename(partition_id):
def partition_set_name(partition_id, partition_name, redirect=1):
"""Set partition name"""
partition_name = partition_name.strip()
partition_name = str(partition_name).strip()
if not partition_name:
raise ValueError("partition name must be non empty")
partition = get_partition(partition_id)
@ -1347,6 +1347,7 @@ def create_etapes_partition(formsemestre_id, partition_name="apo_etapes"):
"""
from app.scodoc import sco_formsemestre_inscriptions
partition_name = str(partition_name)
log("create_etapes_partition(%s)" % formsemestre_id)
ins = sco_formsemestre_inscriptions.do_formsemestre_inscription_list(
args={"formsemestre_id": formsemestre_id}