Commit 4bdc2aa2 authored by 段英荣's avatar 段英荣

modify

parent 8fd1e445
......@@ -45,10 +45,13 @@ class User(models.Model):
return (is_recommend,is_shadow)
def get_latest_topic_time_val(self):
latest_topic_time_val = -1
# 获取该用户最新发帖时间
topic_records = Topic.objects.filter(user_id=self.user_id).order_by("-update_time").values_list("update_time").first()
tzlc_topic_update_time = tzlc(topic_records.update_time)
latest_topic_time_val = int(time.mktime(tzlc_topic_update_time.timetuple()))
if topic_records:
tzlc_topic_update_time = tzlc(topic_records.update_time)
latest_topic_time_val = int(time.mktime(tzlc_topic_update_time.timetuple()))
"""
check_index = 0
......
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