Commit 48ec3d35 authored by klafyvel's avatar klafyvel Committed by chirac

default ttl to 0

parent 13a06c1a
Pipeline #2270 passed with stage
in 3 minutes and 17 seconds
......@@ -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',
......
......@@ -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:
......
......@@ -8,7 +8,7 @@ from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('preferences', '0063_mandate'),
('preferences', '0065_auto_20191010_1227'),
]
operations = [
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment