The CustomerSerializer was missing a create method to generate a unique username, causing IntegrityError when trying to create customers. - Add first_name and last_name as write-only fields - Remove email from read_only_fields so it can be set on creation - Generate username from email prefix (with counter for uniqueness) - Fall back to UUID-based username if no email provided 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
37 KiB
37 KiB