Commit add60840 authored by c24b's avatar c24b

FIXING new RESOURCETYPE definition

parent 4f67deb2
...@@ -4,6 +4,10 @@ from gargantext.util.db_cache import cache ...@@ -4,6 +4,10 @@ from gargantext.util.db_cache import cache
from gargantext.util.files import upload from gargantext.util.files import upload
from gargantext.models import * from gargantext.models import *
from gargantext.constants import * from gargantext.constants import *
from gargantext.util.scheduling import scheduled
from gargantext.util.toolchain import parse_extract_indexhyperdata
from datetime import datetime from datetime import datetime
from collections import defaultdict from collections import defaultdict
from django.utils.translation import ugettext_lazy from django.utils.translation import ugettext_lazy
...@@ -113,7 +117,8 @@ def project(request, project_id): ...@@ -113,7 +117,8 @@ def project(request, project_id):
resources = corpus.resources() resources = corpus.resources()
if len(resources): if len(resources):
resource = resources[0] resource = resources[0]
resource_type_name = RESOURCETYPES[resource['type']]['name'] #resource_type_name = RESOURCETYPES[resource['type']]['name']
resource_type_name = get_resource(resource["type"])["name"]
else: else:
print("(WARNING) PROJECT view: no listed resource") print("(WARNING) PROJECT view: no listed resource")
# add some data for the viewer # add some data for the viewer
...@@ -168,5 +173,3 @@ def project(request, project_id): ...@@ -168,5 +173,3 @@ def project(request, project_id):
'query_size': QUERY_SIZE_N_DEFAULT, 'query_size': QUERY_SIZE_N_DEFAULT,
}, },
) )
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