mirror of
https://github.com/ansible/awx.git
synced 2026-05-07 09:27:36 -02:30
update to not use organizations
This commit is contained in:
@@ -479,13 +479,14 @@ def main():
|
|||||||
labels = module.params.get('labels')
|
labels = module.params.get('labels')
|
||||||
if labels is not None:
|
if labels is not None:
|
||||||
association_fields['labels'] = []
|
association_fields['labels'] = []
|
||||||
|
|
||||||
for item in labels:
|
for item in labels:
|
||||||
search_fields = {'name': item}
|
association_fields['labels'].append(module.resolve_name_to_id('labels', item))
|
||||||
if organization:
|
# Code to use once Issue #7567 is resolved
|
||||||
search_fields['organization'] = organization_id
|
# search_fields = {'name': item}
|
||||||
label_id = module.get_one('labels', **{'data': search_fields})
|
# if organization:
|
||||||
association_fields['labels'].append(label_id)
|
# search_fields['organization'] = organization_id
|
||||||
|
# label_id = module.get_one('labels', **{'data': search_fields})
|
||||||
|
# association_fields['labels'].append(label_id)
|
||||||
|
|
||||||
notifications_start = module.params.get('notification_templates_started')
|
notifications_start = module.params.get('notification_templates_started')
|
||||||
if notifications_start is not None:
|
if notifications_start is not None:
|
||||||
|
|||||||
@@ -256,13 +256,14 @@ def main():
|
|||||||
labels = module.params.get('labels')
|
labels = module.params.get('labels')
|
||||||
if labels is not None:
|
if labels is not None:
|
||||||
association_fields['labels'] = []
|
association_fields['labels'] = []
|
||||||
|
|
||||||
for item in labels:
|
for item in labels:
|
||||||
search_fields = {'name': item}
|
association_fields['labels'].append(module.resolve_name_to_id('labels', item))
|
||||||
if organization:
|
# Code to use once Issue #7567 is resolved
|
||||||
search_fields['organization'] = organization_id
|
# search_fields = {'name': item}
|
||||||
label_id = module.get_one('labels', **{'data': search_fields})
|
# if organization:
|
||||||
association_fields['labels'].append(label_id)
|
# search_fields['organization'] = organization_id
|
||||||
|
# label_id = module.get_one('labels', **{'data': search_fields})
|
||||||
|
# association_fields['labels'].append(label_id)
|
||||||
|
|
||||||
on_change = None
|
on_change = None
|
||||||
new_spec = module.params.get('survey')
|
new_spec = module.params.get('survey')
|
||||||
|
|||||||
Reference in New Issue
Block a user