Fix email field not saving in EventAdmin RSVP edit form
- Changed submission data field from 'email_address' to 'attendee_email' - Backend expects 'attendee_email' but frontend was sending 'email_address' - This fixes the issue where email updates wouldn't save to the database - Email field now properly updates when edited through the admin interface
This commit is contained in:
@@ -387,7 +387,7 @@ const EventAdmin: React.FC = () => {
|
|||||||
// Prepare submission data in the exact format the backend expects
|
// Prepare submission data in the exact format the backend expects
|
||||||
const submissionData = {
|
const submissionData = {
|
||||||
name: editForm.name,
|
name: editForm.name,
|
||||||
email_address: editForm.email_address,
|
attendee_email: editForm.email_address,
|
||||||
attending: editForm.attending,
|
attending: editForm.attending,
|
||||||
bringing_guests: editForm.bringing_guests,
|
bringing_guests: editForm.bringing_guests,
|
||||||
guest_count: editForm.bringing_guests === 'yes' ? Math.max(1, parseInt(editForm.guest_count.toString(), 10)) : 0,
|
guest_count: editForm.bringing_guests === 'yes' ? Math.max(1, parseInt(editForm.guest_count.toString(), 10)) : 0,
|
||||||
|
|||||||
Reference in New Issue
Block a user