| Index: components/policy/tools/generate_policy_source.py
|
| diff --git a/components/policy/tools/generate_policy_source.py b/components/policy/tools/generate_policy_source.py
|
| index 0be012abf272e7c6998a84d851e007416443d5ec..99b334251d6bb1cbd073e9e6b73e050b47f4c2f9 100755
|
| --- a/components/policy/tools/generate_policy_source.py
|
| +++ b/components/policy/tools/generate_policy_source.py
|
| @@ -420,7 +420,8 @@ class SchemaNodesGenerator:
|
|
|
| if schema['type'] == 'array':
|
| # Special case for lists of strings, which is a common policy type.
|
| - if schema['items']['type'] == 'string':
|
| + # The 'type' may be missing if the schema has a '$ref' attribute.
|
| + if schema['items'].get('type', '') == 'string':
|
| return self.GetStringList()
|
| return self.AppendSchema('TYPE_LIST',
|
| self.GenerateAndCollectID(schema['items'], 'items of ' + name))
|
|
|