Check Domains/Nameservers on Domain delete
This commit is contained in:
parent
80d4b1ad50
commit
1c95b05e8b
|
@ -97,7 +97,10 @@ class Maintainer(WhoisObject):
|
|||
def getNoDeleteReasons(self):
|
||||
reasons = []
|
||||
|
||||
mntables = [Contact, ASBlock, ASNumber, InetNum]
|
||||
# FIXME: Tempfix for circular dependency problem
|
||||
import domains.models
|
||||
|
||||
mntables = [Contact, ASBlock, ASNumber, InetNum, domains.models.Domain, domains.models.Nameserver]
|
||||
for mntable in mntables:
|
||||
candidates = mntable.objects.filter(mnt_by=self).annotate(mntCount=models.Count('mnt_by')).filter(mntCount__lte=1)
|
||||
for candidate in candidates:
|
||||
|
|
Loading…
Reference in New Issue