Skip to content

Commit

Permalink
ci: merge pull request #6811 from ietf-tools/main
Browse files Browse the repository at this point in the history
ci: merge main to release
  • Loading branch information
rjsparks authored Dec 18, 2023
2 parents f3a574c + 4c7be64 commit f770d7c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
9 changes: 6 additions & 3 deletions ietf/api/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,11 +210,14 @@ def err(code, text):
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)
Expand Down
2 changes: 1 addition & 1 deletion ietf/nomcom/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)))
Expand Down

0 comments on commit f770d7c

Please sign in to comment.