CORD-2914 return a list of models that were dirtied
Change-Id: Ib5bdf6d5eb0109e5375a1aea27566f1c380e359c
diff --git a/xos/coreapi/xos_utility_api.py b/xos/coreapi/xos_utility_api.py
index 4f2d125..cddf861 100644
--- a/xos/coreapi/xos_utility_api.py
+++ b/xos/coreapi/xos_utility_api.py
@@ -195,8 +195,11 @@
objs = model.objects.all()
for obj in objs:
try:
- obj.caller = user
- obj.save()
+ obj.caller = user
+ obj.save()
+ item = dirty_models.items.add()
+ item.class_name = model.__name__
+ item.id = obj.id
except Exception, e:
item = dirty_models.items.add()
item.class_name = model.__name__