mirror of
https://github.com/ansible/awx.git
synced 2026-01-21 06:28:01 -03:30
Fix for failing ad hoc command unit tests.
This commit is contained in:
parent
aa0c16d726
commit
0d9d9db1f9
@ -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):
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user