1
0
mirror of https://gitlab.com/brutaldon/brutaldon.git synced 2024-12-04 14:46:24 -05:00

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

View File

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