Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 4 commits into from
Dec 18, 2023

Conversation

rjsparks
Copy link
Member

@rjsparks rjsparks commented Dec 18, 2023

No description provided.

@@ -209,7 +209,7 @@ def err(code, text):
nomcom = NomCom.objects.get(is_accepting_volunteers=True)
except (NomCom.DoesNotExist, NomCom.MultipleObjectsReturned):
nomcom = None
if nomcom:
if nomcom and not Volunteer.objects.filter(nomcom=nomcom,person=object.person).exists():
Copy link
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?

Copy link

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
9 checks passed
@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