[odrs-web/oscp] Whenever a review has not been deleted it reports a date of (0000-00-00 00:00:00) which is represent
- From: Andrea Veri <averi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [odrs-web/oscp] Whenever a review has not been deleted it reports a date of (0000-00-00 00:00:00) which is represent
- Date: Tue, 13 Nov 2018 16:26:50 +0000 (UTC)
commit caae1d183f22aac9a43900138b3a45600b152d75
Author: Andrea Veri <averi redhat com>
Date: Tue Nov 13 17:26:42 2018 +0100
Whenever a review has not been deleted it reports a date of (0000-00-00 00:00:00) which is represented a
string and not as a datetime obkect. That was confusing the app and causing mod_wsgi to crash instantly
app_data/app/db.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/app_data/app/db.py b/app_data/app/db.py
index aef2df7..547f256 100644
--- a/app_data/app/db.py
+++ b/app_data/app/db.py
@@ -38,7 +38,8 @@ def _create_review(e):
review.user_display = e[11]
review.rating = int(e[12])
if e[13]:
- review.date_deleted = int(e[13].strftime("%s"))
+ if e[13] != '0000-00-00 00:00:00':
+ review.date_deleted = int(e[13].strftime("%s"))
review.reported = int(e[14])
return review
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]