return agent's pk when added
@@ -308,7 +308,9 @@ def add(request):
else:
WinUpdatePolicy(agent=agent).save()
- return Response("ok")
+ return Response({"pk": agent.pk})
+ else:
+ return Response("err", status=status.HTTP_400_BAD_REQUEST)
@api_view(["PATCH"])
