diff --git a/whoisdb/models.py b/whoisdb/models.py index 14277cd..91aa196 100644 --- a/whoisdb/models.py +++ b/whoisdb/models.py @@ -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: