Fixes serialization/deserialization issue with puppet context.
This commit is contained in:
parent
59cbbb3e15
commit
73456a3d8c
1 changed files with 3 additions and 1 deletions
|
|
@ -71,7 +71,9 @@ def general_context(request):
|
||||||
if request.user.is_authenticated(): account = request.user
|
if request.user.is_authenticated(): account = request.user
|
||||||
|
|
||||||
puppet = None
|
puppet = None
|
||||||
if request.session.get('puppet'): puppet = request.session['puppet']
|
if account and request.session.get('puppet'):
|
||||||
|
pk = int(request.session.get('puppet'))
|
||||||
|
puppet = next((x for x in account.characters if x.pk == pk), None)
|
||||||
|
|
||||||
return {
|
return {
|
||||||
'account': account,
|
'account': account,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue