Skip to content

Fix api_token update bug for self-hosted edit form

What does this MR do and why?

The bug

When an API key was set for a self-hosted model config, submitting the edit form /admin/ai/self_hosted_models/:self_hosted_model_id/edit erased the API key.

Screen_Recording_2024-08-13_at_12.14.55

The fix

The main change is that the API token field in the form has asterisks as value instead of as a placeholder.

Screenshot_2024-08-14_at_13.10.30

The consequent changes in the controller to ignore the value of the api_token attribute when it has not been touched were also made.

Closes #478772 (closed)

Edited by Patrick Cyiza

Merge request reports

Loading