Commit 4f28285e authored by Michaël Paulon's avatar Michaël Paulon
Browse files

section par défaut set à EXT.

parent 2d575c25
......@@ -392,10 +392,9 @@ class AdherentManager(BaseUserManager):
# On uniformise l'aspect des données
kwargs['pseudo'] = self.model.normalize_username(pseudo)
section = kwargs.pop('section')
section = kwargs.pop('section','EXT')
if not isinstance(section, Section):
section = Section.objects.get(sigle=section)
# Création d'un adhérent et de tous les objets associés en un bloc
with transaction.atomic():
new_adh = self.model(**kwargs)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment