mirror of
https://github.com/ansible/awx.git
synced 2026-02-26 15:36:04 -03:30
JT param everything (#12646)
* Making almost all fields promptable on job templates and config models * Adding EE, IG and label access checks * Changing jobs preferred instance group function to handle the new IG cache field * Adding new ask fields to job template modules * Address unit/functional tests * Adding migration file
This commit is contained in:
committed by
Alan Rominger
parent
04d0e3915c
commit
33c0fb79d6
@@ -531,6 +531,12 @@ def copy_m2m_relationships(obj1, obj2, fields, kwargs=None):
|
||||
src_field_value = getattr(obj1, field_name)
|
||||
if kwargs and field_name in kwargs:
|
||||
override_field_val = kwargs[field_name]
|
||||
# TODO: Should we spike this our or just put the for loop inside the next if and make everything respect order?
|
||||
if field_name == 'instance_groups':
|
||||
# instance_groups are a list but we need to preserve the order
|
||||
for ig_id in override_field_val:
|
||||
getattr(obj2, field_name).add(ig_id)
|
||||
continue
|
||||
if isinstance(override_field_val, (set, list, QuerySet)):
|
||||
getattr(obj2, field_name).add(*override_field_val)
|
||||
continue
|
||||
|
||||
Reference in New Issue
Block a user