mirror of
https://github.com/portainer/portainer.git
synced 2026-08-07 11:24:48 +00:00
feat(db): add rules to avoid some nested transactions BE-12617 (#3271)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user