mirror of
https://github.com/ansible/awx.git
synced 2026-02-21 13:10:11 -03:30
Fix custom inventory scripts on org deletion
We'll now clear the organization for it, this requires a database migration to accept null values for custom inventory scripts
This commit is contained in:
@@ -53,6 +53,12 @@ class Organization(CommonModel):
|
||||
def __unicode__(self):
|
||||
return self.name
|
||||
|
||||
def mark_inactive(self, save=True):
|
||||
for script in self.custom_inventory_scripts.all():
|
||||
script.organization = None
|
||||
script.save()
|
||||
super(Organization, self).mark_inactive(save=save)
|
||||
|
||||
|
||||
class Team(CommonModelNameNotUnique):
|
||||
'''
|
||||
|
||||
Reference in New Issue
Block a user