Skip to content

fix: don't create a volunteer object when a person has already volunt…#6809

Merged
rjsparks merged 4 commits intoietf-tools:mainfrom
rjsparks:no_duplicate_volunteers
Dec 18, 2023
Merged

fix: don't create a volunteer object when a person has already volunt…#6809
rjsparks merged 4 commits intoietf-tools:mainfrom
rjsparks:no_duplicate_volunteers

Conversation

@rjsparks
Copy link
Copy Markdown
Member

@rjsparks rjsparks commented Dec 18, 2023

No description provided.

Comment thread ietf/api/views.py Outdated
except (NomCom.DoesNotExist, NomCom.MultipleObjectsReturned):
nomcom = None
if nomcom:
if nomcom and not Volunteer.objects.filter(nomcom=nomcom,person=object.person).exists():
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Volunteer.objects.get_or_create() instead?

@codecov
Copy link
Copy Markdown

codecov Bot commented Dec 18, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (7d44780) 88.78% compared to head (8fdf2ae) 88.79%.
Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6809   +/-   ##
=======================================
  Coverage   88.78%   88.79%           
=======================================
  Files         285      285           
  Lines       40324    40324           
=======================================
+ Hits        35802    35804    +2     
+ Misses       4522     4520    -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@rjsparks rjsparks merged commit ca664c4 into ietf-tools:main Dec 18, 2023
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Dec 22, 2023
@rjsparks rjsparks deleted the no_duplicate_volunteers branch January 9, 2024 21:14
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants