

def delete(self, *args, **kwargs):
    'Address Records that are glue records or that are pointed to\n        by a CNAME should not be removed from the database.\n        '
    if kwargs.pop('validate_glue', True):
        if self.nameserver_set.exists():
            raise ValidationError('Cannot delete the record {0}. It is a glue record.'.format(kwargs.record_type()))
    if kwargs.pop('check_cname', True):
        if CNAME.objects.filter(target=self.fqdn):
            raise ValidationError('A CNAME points to this {0} record. Change the CNAME before deleting this record.'.format(self.record_type()))
    super(BaseAddressRecord, self).delete(*args, **kwargs)

dataset/ETHPy150Open rtucker-mozilla/mozilla_inventory/mozdns/address_record/models.py BaseAddressRecord.delete/VarMisuse@48/132 `self`->`kwargs`