Commit c5f2b20b authored by 段英荣's avatar 段英荣

modify

parent 4bdc2aa2
...@@ -48,7 +48,7 @@ class User(models.Model): ...@@ -48,7 +48,7 @@ class User(models.Model):
latest_topic_time_val = -1 latest_topic_time_val = -1
# 获取该用户最新发帖时间 # 获取该用户最新发帖时间
topic_records = Topic.objects.filter(user_id=self.user_id).order_by("-update_time").values_list("update_time").first() topic_records = Topic.objects.filter(user_id=self.user_id).order_by("-update_time").values_list("update_time",flat=True).first()
if topic_records: if topic_records:
tzlc_topic_update_time = tzlc(topic_records.update_time) tzlc_topic_update_time = tzlc(topic_records.update_time)
latest_topic_time_val = int(time.mktime(tzlc_topic_update_time.timetuple())) latest_topic_time_val = int(time.mktime(tzlc_topic_update_time.timetuple()))
......
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