ci: merge pull request #6811 from ietf-tools/main
ci: merge main to release
This commit is contained in:
commit
f770d7c2a9
|
@ -210,11 +210,14 @@ def api_new_meeting_registration(request):
|
|||
except (NomCom.DoesNotExist, NomCom.MultipleObjectsReturned):
|
||||
nomcom = None
|
||||
if nomcom:
|
||||
Volunteer.objects.create(
|
||||
Volunteer.objects.get_or_create(
|
||||
nomcom=nomcom,
|
||||
person=object.person,
|
||||
affiliation=data['affiliation'],
|
||||
origin='registration')
|
||||
defaults={
|
||||
"affiliation": data["affiliation"],
|
||||
"origin": "registration"
|
||||
}
|
||||
)
|
||||
return HttpResponse(response, status=202, content_type='text/plain')
|
||||
else:
|
||||
return HttpResponse(status=405)
|
||||
|
|
|
@ -1373,7 +1373,7 @@ def volunteer(request):
|
|||
form = VolunteerForm(person=person, data=request.POST)
|
||||
if form.is_valid():
|
||||
for nc in form.cleaned_data['nomcoms']:
|
||||
nc.volunteer_set.create(person=person, affiliation=form.cleaned_data['affiliation'])
|
||||
nc.volunteer_set.get_or_create(person=person, defaults={"affiliation": form.cleaned_data["affiliation"], "origin":"datatracker"})
|
||||
return redirect('ietf.ietfauth.views.profile')
|
||||
else:
|
||||
form = VolunteerForm(person=person,initial=dict(nomcoms=can_volunteer, affiliation=suggest_affiliation(person)))
|
||||
|
|
Loading…
Reference in a new issue