Check for duplicate emails
This commit is contained in:
parent
168a8c17bc
commit
b8bd3facc3
@ -136,6 +136,9 @@ def import_save(request):
|
|||||||
|
|
||||||
errors = member.validation_problems()
|
errors = member.validation_problems()
|
||||||
|
|
||||||
|
if models.Member.objects.filter(email=request.POST['email']).count() > 0:
|
||||||
|
errors.append('Member with this email already exists')
|
||||||
|
|
||||||
if len(errors) > 0:
|
if len(errors) > 0:
|
||||||
return render(request, 'ssmembership/import/review.html', {
|
return render(request, 'ssmembership/import/review.html', {
|
||||||
'member': member,
|
'member': member,
|
||||||
|
Loading…
Reference in New Issue
Block a user