Commit ce193205 authored by Administrator's avatar Administrator

modifié : ngram/lists.py

List ordered by id to have always the same order (maybe order by date
next)
parent a26e4793
...@@ -33,11 +33,11 @@ def nodeList(user_id=None, corpus_id=None, typeList='MiamList'): ...@@ -33,11 +33,11 @@ def nodeList(user_id=None, corpus_id=None, typeList='MiamList'):
Node.user_id == user_id, Node.user_id == user_id,
Node.parent_id==corpus_id, Node.parent_id==corpus_id,
Node.type_id == cache.NodeType[typeList].id Node.type_id == cache.NodeType[typeList].id
).all() ).order_by(desc(Node.id)).all()
elif typeList in root_list: elif typeList in root_list:
nodes = session.query(Node).filter( nodes = session.query(Node).filter(
Node.type_id == cache.NodeType[typeList].id Node.type_id == cache.NodeType[typeList].id
).all() ).order_by(desc(Node.id)).all()
else: else:
print('typeList not supported yet') print('typeList not supported yet')
sys.exit(0) sys.exit(0)
......
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