Skip to content
Snippets Groups Projects
Commit b25935e5 authored by ynerant's avatar ynerant
Browse files

When data is imported from the NK15, prevent users whenever some aliases are deleted

parent 55024222
No related branches found
No related tags found
1 merge request!104Beta
......@@ -222,7 +222,7 @@ class Alias(models.Model):
normalized_name = models.CharField(
max_length=255,
unique=True,
default='',
blank=False,
editable=False,
)
note = models.ForeignKey(
......@@ -257,6 +257,8 @@ class Alias(models.Model):
if len(normalized_name) >= 255:
raise ValidationError(_('Alias is too long.'),
code='alias_too_long')
if not normalized_name:
raise ValidationError(_('This alias contains only complex character. Please use a more simple alias.'))
try:
sim_alias = Alias.objects.get(normalized_name=normalized_name)
if self != sim_alias:
......
Subproject commit 81709539a2b4b230f506291085fbee3d7d9ac9a2
Subproject commit 4179cad611151d2b66da3fc87cebcb5317779cb2
This diff is collapsed.
This diff is collapsed.
{# The data is already sent as HTML, so we return only the HTML data. Devs don't need a pretty mail... #}
{{ error }}
\ No newline at end of file
Une erreur est survenue dans la Note Kfet. Les détails sont ci-dessous.
Cordialement,
L'équipe de la Note Kfet.
{{ error }}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment