mirror of
https://gitlab.crans.org/bde/nk20
synced 2024-11-27 02:43:01 +00:00
[WEI] Fix error when validating sometimes a membership
Signed-off-by: Yohann D'ANELLO <ynerant@crans.org>
This commit is contained in:
parent
2c02c747f4
commit
5793b83de7
@ -973,12 +973,11 @@ class WEIValidateRegistrationView(ProtectQuerysetMixin, ProtectedCreateView):
|
|||||||
membership.roles.set(WEIRole.objects.filter(name="1A").all())
|
membership.roles.set(WEIRole.objects.filter(name="1A").all())
|
||||||
membership.save()
|
membership.save()
|
||||||
|
|
||||||
ret = super().form_valid(form)
|
membership.save()
|
||||||
|
|
||||||
membership.refresh_from_db()
|
membership.refresh_from_db()
|
||||||
membership.roles.add(WEIRole.objects.get(name="Adhérent WEI"))
|
membership.roles.add(WEIRole.objects.get(name="Adhérent WEI"))
|
||||||
|
|
||||||
return ret
|
return super().form_valid(form)
|
||||||
|
|
||||||
def get_success_url(self):
|
def get_success_url(self):
|
||||||
self.object.refresh_from_db()
|
self.object.refresh_from_db()
|
||||||
|
Loading…
Reference in New Issue
Block a user