Commit be49e970 authored by Alexandre Delanoë's avatar Alexandre Delanoë

[FIX] Notebook delete function needs a commit.

parent 238e6543
......@@ -55,17 +55,18 @@ def scan_hal(request):
def scan_gargantext(corpus_id, request):
return (session.query(DocumentNode)
.filter_by(parent_id=corpus_id)
.filter(Node.title_abstract.match(request))
.filter(DocumentNode.parent_id==corpus_id)
.filter(DocumentNode.title_abstract.match(request))
.count())
def scan_gargantext_and_delete(corpus_id, request):
return (session.query(DocumentNode)
.filter_by(parent_id=corpus_id)
.filter(Node.title_abstract.match(request))
(session.query(DocumentNode)
.filter(DocumentNode.parent_id=corpus_id)
.filter(DocumentNode.title_abstract.match(request))
.delete(synchronize_session='fetch')
)
session.commit()
def myProject_fromUrl(url):
"""
......
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