-
Notifications
You must be signed in to change notification settings - Fork 24
feat: Add co-speakers support for submissions #4522
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
base: main
Are you sure you want to change the base?
Conversation
This commit implements co-speakers support for conference submissions: - Add CoSpeaker model to track co-speakers for each submission - Update GraphQL mutations (sendSubmission and updateSubmission) to accept co-speaker emails - Automatically create User accounts (without passwords) for new co-speaker emails - Send email notifications to new co-speakers when added to a submission - Add validation to limit co-speakers to maximum of 2 per submission - Add co_speaker_invitation email template identifier with placeholders - Register CoSpeaker model in Django admin as inline - Only send emails to newly added co-speakers (not existing ones on update) The email template includes a placeholder to distinguish whether the user already had an account or was newly created. Closes #4521 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Marco Acierno <[email protected]>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #4522 +/- ##
==========================================
- Coverage 94.42% 94.16% -0.27%
==========================================
Files 352 352
Lines 10141 10193 +52
Branches 732 741 +9
==========================================
+ Hits 9576 9598 +22
- Misses 468 494 +26
- Partials 97 101 +4 🚀 New features to boost your workflow:
|
backend/submissions/models.py
Outdated
| verbose_name_plural = _("Submissions Confirm Pending Status") | ||
|
|
||
|
|
||
| class CoSpeaker(TimeStampedModel): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@claude rename this model "SubmissionCoSpeaker"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Claude finished @marcoacierno's task in 2m 29s —— View job
Renaming CoSpeaker to SubmissionCoSpeaker ✓
Tasks
- Read current model and understand all usages
- Update model class name in models.py
- Update references in mutations.py
- Update admin.py registration
- Update migration file
- Commit and push changes
Changes Made
Successfully renamed the CoSpeaker model to SubmissionCoSpeaker across the codebase:
Files updated:
backend/submissions/models.py- Renamed model class definitionbackend/api/submissions/mutations.py- Updated import and all referencesbackend/submissions/admin.py- Updated import and inline admin model referencebackend/submissions/migrations/0031_cospeaker.py- Updated model name in migration
All references to the CoSpeaker model have been updated to use the new SubmissionCoSpeaker name. The migration file content has been updated to create the table with the correct name.
Note: The migration filename itself (0031_cospeaker.py) remains unchanged since renaming it would require approval, but the model name within the migration has been correctly updated to SubmissionCoSpeaker.
- Update model class name in models.py - Update all references in mutations.py - Update admin.py imports and inline admin - Update migration file to use new model name Co-authored-by: Marco Acierno <[email protected]>
backend/api/submissions/mutations.py
Outdated
| if "@" not in email or "." not in email: | ||
| errors.add_error("co_speaker_emails", f"Invalid email format: {email}") | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@claude use Django's validate_email to validate the emails
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Claude finished @marcoacierno's task in 1m 33s —— View job
Using Django's validate_email for email validation
Tasks
- Read mutations.py to understand current email validation
- Replace current validation with Django's validate_email
- Run linting checks (skipped - no permissions)
- Commit and push changes
Changes Made
Replaced the basic email validation (checking for @ and .) with Django's validate_email validator for more robust email validation at backend/api/submissions/mutations.py:223-226.
Updated:
- Added imports for
ValidationErrorandvalidate_emailfrom Django core - Replaced the basic email format check with a try-except block using
validate_email()
This provides proper email validation following Django's standards, which includes checking for valid email format, domain structure, and other email-specific rules.
--- | Branch
| ) | ||
|
|
||
| def validate(self, conference: Conference): | ||
| def validate(self, conference: Conference, current_user=None): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@claude current_user is never None
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Co-authored-by: Marco Acierno <[email protected]>
This PR implements co-speakers support for conference submissions as described in #4521.
Changes
Implementation Details
Closes #4521
🤖 Generated with Claude Code