mirror of
https://github.com/ansible/awx.git
synced 2026-10-31 06:26:15 -02:30
AAP-90692 Nested POST /api/v2/inventories/{id}/hosts/ times out (#16657)
* Update query to use .contains
This commit is contained in:
+1
-1
@@ -728,7 +728,7 @@ class SubListCreateAttachDetachAPIView(SubListCreateAPIView):
|
||||
return Response(attach_errors, status=status.HTTP_400_BAD_REQUEST)
|
||||
|
||||
# Attach the object to the collection.
|
||||
if sub not in relationship.all():
|
||||
if not relationship.contains(sub):
|
||||
relationship.add(sub)
|
||||
|
||||
if created:
|
||||
|
||||
Reference in New Issue
Block a user