Commit 36fc9f74 authored by Administrator's avatar Administrator

[CLEAN] remove useless code.

parent 16fef576
......@@ -276,17 +276,6 @@ def corpus(request, project_id, corpus_id):
type_doc_id = cache.NodeType['Document'].id
number = session.query(func.count(Node.id)).filter(Node.parent_id==corpus_id, Node.type_id==type_doc_id).all()[0][0]
try:
chart = dict()
chart['first'] = parse(corpus.children.first().metadata['publication_date']).strftime("%Y, %m, %d")
# TODO write with sqlalchemy
#chart['first'] = parse(session.query(Node.metadata['publication_date']).filter(Node.parent_id==corpus.id, Node.type_id==type_doc_id).first()).strftime("%Y, %m, %d")
chart['last'] = parse(corpus.children.last().metadata['publication_date']).strftime("%Y, %m, %d")
print(chart)
except Exception as error:
print(error)
try:
processing = corpus.metadata['Processing']
except Exception as error:
......@@ -302,7 +291,6 @@ def corpus(request, project_id, corpus_id):
'processing' : processing,\
# 'documents': documents,\
'number' : number,\
'dates' : chart,\
}))
return HttpResponse(html)
......
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