Skip to content

Commit

Permalink
fix: policy statements is nil (#1144)
Browse files Browse the repository at this point in the history
  • Loading branch information
constwz authored Sep 14, 2023
1 parent 84c2226 commit 8f8fdcc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docker-develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Docker-CI

on:
push:
branches: [ develop ]
branches: [ develop,fix-* ]

env:
IMAGE_NAME: ghcr.io/bnb-chain/greenfield-storage-provider-invisible
Expand Down
6 changes: 4 additions & 2 deletions modular/blocksyncer/modules/permission/permission_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,10 @@ func (m *Module) handlePutPolicy(ctx context.Context, block *tmctypes.ResultBloc
res := make(map[string][]interface{})
k, v := m.db.SavePermissionToSQL(ctx, p)
res[k] = v
k, v = m.db.MultiSaveStatementToSQL(ctx, statements)
res[k] = v
if len(statements) != 0 {
k, v = m.db.MultiSaveStatementToSQL(ctx, statements)
res[k] = v
}

return res, nil
}
Expand Down

0 comments on commit 8f8fdcc

Please sign in to comment.