appli_socle/views: change checking for profile offre creation
This commit is contained in:
parent
97a1312026
commit
6bcf098213
|
@ -221,7 +221,7 @@ class CodeDeConfirmationForm(forms.Form):
|
|||
'email': email,
|
||||
'comment': self.value.get('comment', ''),
|
||||
}
|
||||
self.user_cache, created = models.ProfilOffre.objects.get_or_create(**kwargs)
|
||||
self.user_cache, self.created = models.ProfilOffre.objects.get_or_create(**kwargs)
|
||||
self.user_cache.backend = 'appli_project.appli_socle.backends.ProfilOffreMoteurAuthentification'
|
||||
if created:
|
||||
self.user_cache.set_unusable_password()
|
||||
|
|
|
@ -252,7 +252,7 @@ class VueCodeDeConfirmationEmail(FormView):
|
|||
_(u'confirmation de l\'email {email} avec le jeton {jeton}'),
|
||||
email=form.value['email'],
|
||||
jeton=form.cleaned_data['jeton'])
|
||||
if not form.user_cache.has_usable_password():
|
||||
if getattr(self, 'created', False):
|
||||
self.request.record('nouveau-compte-offre',
|
||||
_(u'création du compte {email}'),
|
||||
email=form.value['email'])
|
||||
|
|
Reference in New Issue