8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-12-23 15:33:45 +00:00

default ttl to 0

This commit is contained in:
Hugo Levy-Falk 2019-10-12 17:22:51 +02:00 committed by chirac
parent 13a06c1a67
commit 48ec3d353e
3 changed files with 5 additions and 8 deletions

View file

@ -10,14 +10,14 @@ class Migration(migrations.Migration):
dependencies = [
('machines', '0102_auto_20190303_1611'),
('preferences', '0064_optionalmachine_default_dns_ttl'),
('preferences', '0066_optionalmachine_default_dns_ttl'),
]
operations = [
migrations.AddField(
model_name='domain',
name='ttl',
field=models.PositiveIntegerField(default=machines.models.get_default_ttl, verbose_name='Time To Live (TTL)'),
field=models.PositiveIntegerField(default=0, verbose_name='Time To Live (TTL)'),
),
migrations.AddField(
model_name='mx',

View file

@ -1560,10 +1560,6 @@ class Ipv6List(RevMixin, AclMixin, FieldPermissionModelMixin, models.Model):
return str(self.ipv6)
def get_default_ttl():
return preferences.models.OptionalMachine.get_cached_value('default_dns_ttl')
class Domain(RevMixin, AclMixin, FieldPermissionModelMixin, models.Model):
""" Objet domain. Enregistrement A et CNAME en même temps : permet de
stocker les alias et les nom de machines, suivant si interface_parent
@ -1588,7 +1584,8 @@ class Domain(RevMixin, AclMixin, FieldPermissionModelMixin, models.Model):
)
ttl = models.PositiveIntegerField(
verbose_name=_("Time To Live (TTL)"),
default=get_default_ttl
default=0 # 0 means that the re2o-service for DNS should retrieve the
# default TTL
)
class Meta:

View file

@ -8,7 +8,7 @@ from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('preferences', '0063_mandate'),
('preferences', '0065_auto_20191010_1227'),
]
operations = [