mirror of
https://github.com/ansible/awx.git
synced 2026-02-01 01:28:09 -03:30
When disassociating objects that are foreign key relationships this implies a delete, so also move the name aside to allow for reuse.
This commit is contained in:
@@ -155,6 +155,7 @@ class BaseSubList(BaseList):
|
||||
relationship.remove(sub)
|
||||
else:
|
||||
# resource is just a ForeignKey, can't remove it from the set, just set it inactive
|
||||
sub.name = "_deleted_%s_%s" % (str(datetime.time()), sub.name)
|
||||
sub.active = False
|
||||
sub.save()
|
||||
return Response(status=status.HTTP_204_NO_CONTENT)
|
||||
|
||||
Reference in New Issue
Block a user