Skip to content

Commit ddf222f

Browse files
committed
Fix element key error
Fixes #23 Add check if element ket is present in the options doc
1 parent fee5346 commit ddf222f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

roles/resource_module/filter_plugins/to_argspec.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def dive(obj, required=False):
2424
result['options'][propkey] = dive(propval, required)
2525
elif obj['type'] == 'array':
2626
result['options'] = {}
27-
if obj['elements']:
27+
if obj.get('elements'):
2828
result['elements'] = obj['elements']
2929
if not 'items' in obj:
3030
raise AnsibleFilterError('missing items key in array')

0 commit comments

Comments
 (0)