Commit 94184a1b authored by delanoe's avatar delanoe

[FIX] adding score to NodeNgramNgram

parent 72ff79e5
...@@ -273,7 +273,8 @@ class Group(APIView): ...@@ -273,7 +273,8 @@ class Group(APIView):
if data['source'] > 0 and len(data['target']) > 0: if data['source'] > 0 and len(data['target']) > 0:
for target_id in data['target']: for target_id in data['target']:
if target_id > 0: if target_id > 0:
session.add(NodeNgramNgram(node_id=group_id,ngramx_id=output['source'], ngramy_id=target_id)) session.add(NodeNgramNgram(node_id=group_id, \
ngramx_id=output['source'], ngramy_id=target_id, score=1))
session.commit() session.commit()
return JsonHttpResponse(True, node_id), 201) return JsonHttpResponse(True, node_id), 201)
else: else:
......
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