Try to fix up account_id value in accounts_dict for mismatched logins

This commit is contained in:
Jason McBrayer 2019-04-24 09:13:12 -04:00
parent a427273f63
commit b1eb270881
1 changed files with 2 additions and 2 deletions

View File

@ -424,8 +424,8 @@ def old_login(request):
return redirect(home) return redirect(home)
except IntegrityError: except IntegrityError:
account = Account.objects.get(username=account.username) account = Account.objects.get(username=account.username)
accounts_dict[account.username]['account_id'] = account.id accounts_dict[account.username] = { 'account_id': account.id, 'user': user }
request.session['accounts_dict'] = accounts_dict request.settings['account_dict'] = accounts_dict
except Exception as ex: except Exception as ex:
form.add_error('', ex) form.add_error('', ex)
return render(request, 'setup/login.html', {'form': form}) return render(request, 'setup/login.html', {'form': form})