mirror of
https://github.com/ansible/awx.git
synced 2026-03-19 09:57:33 -02:30
Merge pull request #1917 from AlanCoding/no_more
Do not put deep copy items in activity stream
This commit is contained in:
@@ -2360,6 +2360,7 @@ def deep_copy_model_obj(
|
|||||||
):
|
):
|
||||||
logger.info(six.text_type('Deep copy {} from {} to {}.').format(model_name, obj_pk, new_obj_pk))
|
logger.info(six.text_type('Deep copy {} from {} to {}.').format(model_name, obj_pk, new_obj_pk))
|
||||||
from awx.api.generics import CopyAPIView
|
from awx.api.generics import CopyAPIView
|
||||||
|
from awx.main.signals import disable_activity_stream
|
||||||
model = getattr(importlib.import_module(model_module), model_name, None)
|
model = getattr(importlib.import_module(model_module), model_name, None)
|
||||||
if model is None:
|
if model is None:
|
||||||
return
|
return
|
||||||
@@ -2370,7 +2371,7 @@ def deep_copy_model_obj(
|
|||||||
except ObjectDoesNotExist:
|
except ObjectDoesNotExist:
|
||||||
logger.warning("Object or user no longer exists.")
|
logger.warning("Object or user no longer exists.")
|
||||||
return
|
return
|
||||||
with transaction.atomic(), ignore_inventory_computed_fields():
|
with transaction.atomic(), ignore_inventory_computed_fields(), disable_activity_stream():
|
||||||
copy_mapping = {}
|
copy_mapping = {}
|
||||||
for sub_obj_setup in sub_obj_list:
|
for sub_obj_setup in sub_obj_list:
|
||||||
sub_model = getattr(importlib.import_module(sub_obj_setup[0]),
|
sub_model = getattr(importlib.import_module(sub_obj_setup[0]),
|
||||||
|
|||||||
Reference in New Issue
Block a user