Commit 4e33dfa4 authored by delanoe's avatar delanoe

Merge branch 'refactoring' into refactoring-alex

parents e8d8c48a 21300636
......@@ -13,7 +13,7 @@ _node_available_types = NODETYPES
def _query_nodes(request, node_id=None):
user = cache.User[request.user.username]
user = cache.User[request.user.id]
# parameters validation
parameters = get_parameters(request)
parameters = validate(parameters, {'type': dict, 'items': {
......
......@@ -20,7 +20,7 @@ def overview(request):
To each project, we can link a resource that can be an image.
'''
user = cache.User[request.user.username]
user = cache.User[request.user.id]
# If POST method, creates a new project...
if request.method == 'POST':
......@@ -74,7 +74,7 @@ class NewCorpusForm(forms.Form):
@requires_auth
def project(request, project_id):
# current user
user = cache.User[request.user.username]
user = cache.User[request.user.id]
# viewed project
project = session.query(Node).filter(Node.id == project_id).first()
if project is None:
......
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