文档服务地址:http://47.92.0.57:3000/ 周报索引地址:http://47.92.0.57:3000/s/NruNXRYmV

Commit 8f69dcec by 李景熙

修复bug

parent 5eb47d72
......@@ -32,14 +32,13 @@ class Relation(Model):
def create_relation(slice_id, user_id, data_id):
try:
r = Relation.get(slice_id=slice_id, user_id=user_id, data_id=data_id)
if not r:
Slice.add_annotation(slice_id)
relation = Relation(slice_id=slice_id, user_id=user_id, data_id=data_id)
relation.save()
except:
return Result(0, "create failed", {})
else:
Slice.add_annotation(slice_id)
relation = Relation(slice_id=slice_id, user_id=user_id, data_id=data_id)
relation.save()
return Result(1, "create success", {})
else:
return Result(0, "create failed", {})
# 设置标注关系的打分数值
......
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