diff options
-rw-r--r-- | table/policy.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/table/policy.go b/table/policy.go index 2b16ef65..5829fc98 100644 --- a/table/policy.go +++ b/table/policy.go @@ -2329,7 +2329,10 @@ func NewPolicy(c config.PolicyDefinition, dmap DefinedSetMap) (*Policy, error) { stmts := c.Statements.StatementList if len(stmts) != 0 { st = make([]*Statement, 0, len(stmts)) - for _, stmt := range stmts { + for idx, stmt := range stmts { + if stmt.Name == "" { + stmt.Name = fmt.Sprintf("%s_stmt%d", c.Name, idx) + } s, err := NewStatement(stmt, dmap) if err != nil { return nil, err |