Fix blank email/username handling in service accounts
What does this MR do and why?
This change improves how the service account creation and update features handle empty or blank input values.
Previously, the system would only check if a parameter was completely missing (nil), but now it also properly handles cases where someone submits empty strings or whitespace-only values. For example, if someone tries to create a service account with just spaces as the username, the system will now ignore that input and generate a proper username automatically instead of using the blank value.
The update also removes any completely empty parameters from the update process, ensuring cleaner data handling throughout the service account management workflow.
Closes #583605
References
Screenshots or screen recordings
| Before | After |
|---|---|
|
|
- Navigate to http://gdk.test:3000/admin/application_settings/service_accounts
- Test create with blank fields:
- Click "Add service account"
- Put space in username/email fields
- Submit - should succeed with auto-generated values
- Test update with blank fields:
- Edit an existing service account
- Clear the username or email field
- Submit - should succeed without validation errors (fields remain unchanged)
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

