Fix bug in import save when non-existent member
This commit is contained in:
parent
c8841f10b6
commit
168a8c17bc
@ -121,7 +121,11 @@ def import_save(request):
|
||||
|
||||
member = mimport.by_email(request.POST['email_orig'])
|
||||
|
||||
if member:
|
||||
if not member:
|
||||
return render(request, 'ssmembership/import/review.html', {
|
||||
'member': member
|
||||
})
|
||||
|
||||
member.student_id = request.POST['student_id']
|
||||
member.email = request.POST['email']
|
||||
member.first_name = request.POST['first_name']
|
||||
@ -131,7 +135,8 @@ def import_save(request):
|
||||
member.is_msa = True if request.POST['is_msa'] == '1' else '0'
|
||||
|
||||
errors = member.validation_problems()
|
||||
if not member or len(errors) > 0:
|
||||
|
||||
if len(errors) > 0:
|
||||
return render(request, 'ssmembership/import/review.html', {
|
||||
'member': member,
|
||||
'years': models.Member.YEARS,
|
||||
|
Loading…
Reference in New Issue
Block a user