mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-11-26 06:32:26 +00:00
ptr are empty if revere disabled
This commit is contained in:
parent
cee0d1188e
commit
b9a4dd6d65
1 changed files with 11 additions and 5 deletions
|
@ -450,14 +450,20 @@ class IpType(RevMixin, AclMixin, models.Model):
|
||||||
|
|
||||||
def get_associated_ptr_records(self):
|
def get_associated_ptr_records(self):
|
||||||
from re2o.utils import all_active_assigned_interfaces
|
from re2o.utils import all_active_assigned_interfaces
|
||||||
return (all_active_assigned_interfaces()
|
if self.reverse_v4:
|
||||||
.filter(type__ip_type=self)
|
return (all_active_assigned_interfaces()
|
||||||
.filter(ipv4__isnull=False))
|
.filter(type__ip_type=self)
|
||||||
|
.filter(ipv4__isnull=False))
|
||||||
|
else:
|
||||||
|
return None
|
||||||
|
|
||||||
def get_associated_ptr_v6_records(self):
|
def get_associated_ptr_v6_records(self):
|
||||||
from re2o.utils import all_active_interfaces
|
from re2o.utils import all_active_interfaces
|
||||||
return (all_active_interfaces(full=True)
|
if self.reverse_v6:
|
||||||
.filter(type__ip_type=self))
|
return (all_active_interfaces(full=True)
|
||||||
|
.filter(type__ip_type=self))
|
||||||
|
else:
|
||||||
|
return None
|
||||||
|
|
||||||
def clean(self):
|
def clean(self):
|
||||||
""" Nettoyage. Vérifie :
|
""" Nettoyage. Vérifie :
|
||||||
|
|
Loading…
Reference in a new issue