From 0d9d9db1f97125dbfe5b06539bdae69867232150 Mon Sep 17 00:00:00 2001 From: Chris Church Date: Thu, 9 Apr 2015 22:08:33 -0400 Subject: [PATCH] Fix for failing ad hoc command unit tests. --- awx/api/views.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/awx/api/views.py b/awx/api/views.py index 8fa4fe52ca..10b72cc34e 100644 --- a/awx/api/views.py +++ b/awx/api/views.py @@ -2188,6 +2188,11 @@ class AdHocCommandList(ListCreateAPIView): serializer_class = AdHocCommandListSerializer new_in_220 = True + @csrf_exempt + @transaction.non_atomic_requests + def dispatch(self, *args, **kwargs): + return super(AdHocCommandList, self).dispatch(*args, **kwargs) + def create(self, request, *args, **kwargs): # Inject inventory ID and limit if parent objects is a host/group. if hasattr(self, 'get_parent_object') and not getattr(self, 'parent_key', None):