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

Commit 4ada63da by 李景熙

更改

parent 1912ce2e
......@@ -23,6 +23,7 @@ class Relation(Model):
score = IntegerField(default=0)
receive_time = DateTimeField(default=datetime.datetime.now())
complete_time = DateTimeField(null=True)
# 如果用户只是标注,那这个值就不为空,如果提交、则flag变为true
class Meta:
database = mysql
......@@ -145,7 +146,7 @@ def get_total_num2(userId, sliceId):
def get_flag_count(userId, sliceId):
try:
num = Relation.select().where(Relation.user_id == userId, Relation.slice_id == sliceId,
Relation.flag == 1).count()
Relation.complete_time is not None).count()
except:
return 0
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