feat(db): add rules to avoid some nested transactions BE-12617 (#3271)

This commit is contained in:
andres-portainer
2026-07-27 09:06:15 -03:00
committed by GitHub
parent 244b0d63fe
commit e178cd67bb
3 changed files with 39 additions and 2 deletions
@@ -95,7 +95,7 @@ func (handler *Handler) endpointGroupList(w http.ResponseWriter, r *http.Request
var handlerErr *httperror.HandlerError
if err := handler.DataStore.ViewTx(func(tx dataservices.DataStoreTx) error {
var txErr error
endpointGroups, txErr = handler.DataStore.EndpointGroup().ReadAll()
endpointGroups, txErr = tx.EndpointGroup().ReadAll()
if txErr != nil {
handlerErr = httperror.InternalServerError("Unable to retrieve environment groups from the database", txErr)
return handlerErr