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

Commit 3de8394f by 李景熙

修改标注者获取逻辑

parent 1dbd991d
......@@ -168,7 +168,7 @@ def get_state(user_id, data_id):
# 获取某文件的标注者信息
def get_executors(data_id):
try:
find = Relation.select(Relation.user_id, Relation.relation_id).where(Relation.data_id == data_id, Relation.flag is True, Relation.flag2 is False)
find = Relation.select(Relation.user_id, Relation.relation_id).where(Relation.data_id == data_id, Relation.flag == 1, Relation.flag2 == 0)
index = 0
list = []
while index < len(find):
......@@ -197,7 +197,8 @@ def get_relation_id(uid, did):
if __name__ == '__main__':
Relation.drop_table()
Relation.create_table()
# Relation.drop_table()
# Relation.create_table()
print(get_executors(4).data)
# print(get_state(1, 5))
# create_relation(3, 1, 2)
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