[Update] 修改一些bug

This commit is contained in:
ibuler
2018-05-09 17:35:46 +08:00
parent 0a9af98729
commit 8e74a04282
4 changed files with 10 additions and 9 deletions

View File

@@ -58,6 +58,9 @@ class SystemUserPushApi(generics.RetrieveAPIView):
def retrieve(self, request, *args, **kwargs):
system_user = self.get_object()
nodes = system_user.nodes.all()
for node in nodes:
system_user.assets.add(*tuple(node.get_all_assets()))
task = push_system_user_to_assets_manual.delay(system_user)
return Response({"task": task.id})