fix: se ajusta transaccion de ajustes automaticos cuando se actualiza…#513
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Este PR ajusta el manejo de errores y corrige la actualización automática de elementos de acta para evitar fallos al hacer PUT en acta_recibido_crud (especialmente por campos de fechas not-null), además de actualizar definiciones Swagger y simplificar un helper de consecutivos.
Changes:
- Endurece
ErrorControlControllerantepaniccon tipos inesperados. - Preserva
FechaCreacion/FechaModificacional generar payloads de actualización de acta en ajustes automáticos. - Ajusta queries y artefactos auxiliares (Swagger y helper de consecutivos).
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| utils_oas/errorCtrl/errorCtrl.go | Manejo más seguro del recover() en controladores. |
| swagger/swagger.json | Reordenamiento/actualización de la ruta /salida/{id}/anular en el spec. |
| helpers/crud/consecutivos/Post.go | Simplifica el post-procesamiento de response.Data y elimina logs redundantes. |
| helpers/ajustesHelper/ajustes.movimientos.helper.go | Corrige el query para consultar estado de movimiento “Ajuste Aprobado”. |
| helpers/ajustesHelper/ajustes.auto.helper.go | Pasa los originales del acta para preservar fechas al actualizar. |
| helpers/ajustesHelper/ajustes.acta.helper.go | Preserva fechas originales al construir los elementos para PUT en acta. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+15
to
+19
| localError, ok := err.(map[string]interface{}) | ||
| if !ok { | ||
| c.Abort(strconv.Itoa(http.StatusInternalServerError)) | ||
| return | ||
| } |
Comment on lines
20
to
22
| appName, _ := web.AppConfig.String("appname") | ||
| c.Data["mesaage"] = (appName + "/" + controller + "/" + (localError["funcion"]).(string)) | ||
| c.Data["data"] = normalizeErrorValue(localError["err"]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
… acta recibido