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

同步

parent bd3ced31
...@@ -1053,12 +1053,15 @@ class Answer(models.Model): ...@@ -1053,12 +1053,15 @@ class Answer(models.Model):
delta_30 = datetime.timedelta(days=30) delta_30 = datetime.timedelta(days=30)
delta_90 = datetime.timedelta(days=90) delta_90 = datetime.timedelta(days=90)
delta_365 = datetime.timedelta(days=365) delta_365 = datetime.timedelta(days=365)
if d2 - delta_30 <= create_time: if d2:
return 30 if d2 - delta_30 <= create_time:
elif d2 - delta_90 <= create_time: return 30
return 90 elif d2 - delta_90 <= create_time:
elif d2 - delta_365 <= create_time: return 90
return 365 elif d2 - delta_365 <= create_time:
return 365
else:
return 1000
else: else:
return 1000 return 1000
except: except:
......
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