fix(api): editing an SSO provider name returns 200 but keeps the old name

Abierto Apto para principiantes
#8,022 1 comentario 1 reacción 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
72/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
postgresql, python

Línea de trabajo

Empieza con OrganizationsService.update_provider en api/ee/src/core/organizations/service.py, que establece name, slug y description en el objeto. Después lee OrganizationProvidersDAO.update en api/ee/src/dbs/postgres/organizations/dao.py, que solo escribe flags, secret_id y updated_at. Pasa los tres campos y persístelos allí. Está terminado cuando editar el nombre y leer GET /api/organizations/providers/ devuelve el nuevo valor, cubierto por un test nuevo.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

What happens

An organization admin edits an SSO provider in Settings > Access and security and changes its name. The save succeeds with HTTP 200 and updated_at changes. But the provider list still shows the old name.

Found during the v0.128.3 staging QA in /m. The request body sent the new name, so the frontend is not the cause.

Steps to reproduce

  1. On an enterprise-plan organization, add an SSO provider.
  2. Edit it and change only the name. Save.
  3. GET /api/organizations/providers/ returns the old name.

Expected

The new name is saved and shown. The same likely applies to slug and description.

Likely cause

OrganizationsService.update_provider (api/ee/src/core/organizations/service.py) sets provider.name, provider.slug and provider.description on the object from dao.get_by_id. Then it calls OrganizationProvidersDAO.update (api/ee/src/dbs/postgres/organizations/dao.py), which loads the row again and writes only flags, secret_id and updated_at. So name, slug and description never reach the database.

Fix

Pass name, slug and description to OrganizationProvidersDAO.update and write them there. Add a test that edits the name and reads it back.

Lenguaje dominante
TypeScript
Estrellas
4.8k
Forks
690
Merge medio
23 h 26 min
PR fusionados (30 d)
507

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de Agenta-AI/agenta

Todos los issues de Agenta-AI/agenta

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.