diff --git a/policy/policy_contract.go b/policy/policy_contract.go index 3a44153..b73b743 100644 --- a/policy/policy_contract.go +++ b/policy/policy_contract.go @@ -211,6 +211,7 @@ func ListChainsByPrefix(entity Kind, entityName string, prefix []byte) [][]byte func IteratorChainsByPrefix(entity Kind, entityName string, prefix []byte) iterator.Iterator { ctx := storage.GetReadOnlyContext() - keyPrefix := storageKey(entity, entityName, prefix) + id, _ := mapToNumeric(ctx, []byte(entityName)) + keyPrefix := storageKey(entity, id, prefix) return storage.Find(ctx, keyPrefix, storage.ValuesOnly) }