Commit e02905b9 authored by Administrator's avatar Administrator

[BUGFIX] request.session._cache does not exist. use request.user.id instead.

parent 3f5ec56f
...@@ -556,7 +556,7 @@ class NodesList(APIView): ...@@ -556,7 +556,7 @@ class NodesList(APIView):
def get(self, request): def get(self, request):
query = (session query = (session
.query(Node.id, Node.name, NodeType.name.label('type')) .query(Node.id, Node.name, NodeType.name.label('type'))
.filter(Node.user_id == request.session._session_cache['_auth_user_id']) .filter(Node.user_id == str(request.user.id))
.join(NodeType) .join(NodeType)
) )
if 'type' in request.GET: if 'type' in request.GET:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment