mirror of
https://github.com/ansible/awx.git
synced 2026-05-14 12:57:40 -02:30
Fix for failing ad hoc command unit tests.
This commit is contained in:
@@ -2188,6 +2188,11 @@ class AdHocCommandList(ListCreateAPIView):
|
|||||||
serializer_class = AdHocCommandListSerializer
|
serializer_class = AdHocCommandListSerializer
|
||||||
new_in_220 = True
|
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):
|
def create(self, request, *args, **kwargs):
|
||||||
# Inject inventory ID and limit if parent objects is a host/group.
|
# 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):
|
if hasattr(self, 'get_parent_object') and not getattr(self, 'parent_key', None):
|
||||||
|
|||||||
Reference in New Issue
Block a user