[odrs-web/oscp] Attempt to fix backtrace
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [odrs-web/oscp] Attempt to fix backtrace
- Date: Wed, 30 Sep 2020 19:04:12 +0000 (UTC)
commit ac37eb2b67368b061a0e44b4777434fb38088d0c
Author: Richard Hughes <richard hughsie com>
Date: Wed Sep 30 20:04:07 2020 +0100
Attempt to fix backtrace
app_data/odrs/views_api.py | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
---
diff --git a/app_data/odrs/views_api.py b/app_data/odrs/views_api.py
index 153381c..a1891e5 100644
--- a/app_data/odrs/views_api.py
+++ b/app_data/odrs/views_api.py
@@ -49,8 +49,7 @@ def _get_review_score(review, item):
ku = review.karma_up
kd = review.karma_down
- created = datetime.datetime.fromtimestamp(review.date_created)
- months_old = (datetime.datetime.now() - created).days // 30
+ months_old = (datetime.datetime.now() - review.date_created).days // 30
# If the review is very new, provide a temporary visibility boost.
# The floor of 4 is arbitrary and may need adjustment in the future.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]