mirror of
https://github.com/ansible/awx.git
synced 2026-03-20 02:17:37 -02:30
Merge pull request #1664 from AlanCoding/more_wfjt_cred_fixes
Correctly check credential permission on WFJT copy
This commit is contained in:
@@ -2326,6 +2326,9 @@ def _reconstruct_relationships(copy_mapping):
|
||||
setattr(new_obj, field_name, related_obj)
|
||||
elif field.many_to_many:
|
||||
for related_obj in getattr(old_obj, field_name).all():
|
||||
logger.debug(six.text_type('Deep copy: Adding {} to {}({}).{} relationship').format(
|
||||
related_obj, new_obj, model, field_name
|
||||
))
|
||||
getattr(new_obj, field_name).add(copy_mapping.get(related_obj, related_obj))
|
||||
new_obj.save()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user