Commit c842c056 authored by 李小芳's avatar 李小芳

更新es的配置

parent 06270a1d
......@@ -991,11 +991,11 @@ class Answer(models.Model):
delta_30 = datetime.timedelta(days=30)
delta_90 = datetime.timedelta(days=90)
delta_365 = datetime.timedelta(days=365)
if d2 - delta_30 <= create_time:
if delta_30 and d2 - delta_30 <= create_time:
return 30
elif d2 - delta_90 <= create_time:
elif delta_90 and d2 - delta_90 <= create_time:
return 90
elif d2 - delta_365 <= create_time:
elif delta_365 and d2 - delta_365 <= create_time:
return 365
else:
return 1000
......
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