From 784acaca46ce8c9153eb4db274d6d9bccc6e3853 Mon Sep 17 00:00:00 2001 From: Antoine Nguyen Date: Sat, 5 Nov 2016 14:53:11 +0100 Subject: [PATCH] Fixed form. --- modoboa/admin/models/domain.py | 6 +++--- modoboa/relaydomains/forms.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/modoboa/admin/models/domain.py b/modoboa/admin/models/domain.py index 476764e00..c4b233c5c 100644 --- a/modoboa/admin/models/domain.py +++ b/modoboa/admin/models/domain.py @@ -108,14 +108,14 @@ class Domain(AdminObject): @property def just_created(self): - """return true if the domain was created in the latest 24h""" + """Return true if the domain was created in the latest 24h.""" now = timezone.now() delta = datetime.timedelta(days=1) return self.creation + delta > now def awaiting_checks(self): - """return true if the domain has no valid MX records and was created - in the latest 24h""" + """Return true if the domain has no valid MX record and was created + in the latest 24h.""" if (not self.mxrecord_set.has_valids()) and self.just_created: return True return False diff --git a/modoboa/relaydomains/forms.py b/modoboa/relaydomains/forms.py index afca9e8e0..a656011ce 100644 --- a/modoboa/relaydomains/forms.py +++ b/modoboa/relaydomains/forms.py @@ -30,7 +30,7 @@ class RelayDomainFormGeneral(forms.ModelForm): class Meta: model = RelayDomain - exclude = ["domain"] + exclude = ["domain", "creation", "last_modification"] widgets = { "service": forms.Select(attrs={"class": "form-control"}) }