mirror of
https://github.com/ansible/awx.git
synced 2026-01-09 23:12:08 -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:
parent
b8ee694d82
commit
00d4f67f22
@ -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)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user