forked from ScoDoc/DocScoDoc
Fix: edit module si pas de numero
This commit is contained in:
parent
44237c648b
commit
1e7a509879
@ -124,7 +124,7 @@ def module_create(matiere_id=None, module_type=None, semestre_id=None):
|
||||
# cherche le numero adéquat (pour placer le module en fin de liste)
|
||||
modules = matiere.ue.formation.modules.all()
|
||||
if modules:
|
||||
default_num = max([m.numero for m in modules]) + 10
|
||||
default_num = max([m.numero or 0 for m in modules]) + 10
|
||||
else:
|
||||
default_num = 10
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user