1
0
mirror of https://gitlab.crans.org/bde/nk20 synced 2025-06-21 01:48:21 +02:00
This commit is contained in:
Yohann D'ANELLO
2020-03-27 14:19:55 +01:00
parent dadd840645
commit 823bcfe781
6 changed files with 19 additions and 26 deletions

View File

@ -242,10 +242,10 @@ class Alias(models.Model):
pass
self.normalized_name = normalized_name
def save(self,*args,**kwargs):
def save(self, *args, **kwargs):
self.normalized_name = self.normalize(self.name)
super().save(*args,**kwargs)
super().save(*args, **kwargs)
def delete(self, using=None, keep_parents=False):
if self.name == str(self.note):
raise ValidationError(_("You can't delete your main alias."),

View File

@ -2,7 +2,6 @@
# SPDX-License-Identifier: GPL-3.0-or-later
from django.db import models
from django.db.models import F
from django.urls import reverse
from django.utils import timezone
from django.utils.translation import gettext_lazy as _