Commit 0f28d57a authored by Christophe Henry's avatar Christophe Henry

bugfix: Add uniqueness constraint on user email...

bugfix: Add uniqueness constraint on user email (#33)
parent cca89292
Pipeline #6610 passed with stage
in 27 seconds
# -*- coding: utf-8 -*-
# Generated by Django 1.11.25 on 2019-12-03 09:21
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('djangoldp_account', '0003_auto_20191024_0854'),
]
operations = [
migrations.AlterField(
model_name='ldpuser',
name='email',
field=models.EmailField(blank=True, error_messages={'unique': 'A user with that uses this email address already exists.'}, max_length=254, unique=True, verbose_name='email address'),
),
]
......@@ -55,6 +55,14 @@ class LDPUser(AbstractUser, Model):
'unique': _("A user with that username already exists."),
},
)
email = models.EmailField(
_('email address'),
blank=True,
unique=True,
error_messages={
'unique': _("A user with that uses this email address already exists."),
},
)
class Meta:
verbose_name = _('user')
......
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