[odrs-web/oscp] Allow db upgrade



commit cefd9a9b9172caf53b9206dd6c963769559c1cfa
Author: Richard Hughes <richard hughsie com>
Date:   Mon Jul 1 14:35:33 2019 +0100

    Allow db upgrade

 app_data/migrations/versions/b8243269e9cf_.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/app_data/migrations/versions/b8243269e9cf_.py b/app_data/migrations/versions/b8243269e9cf_.py
index dfe8018..1d31760 100644
--- a/app_data/migrations/versions/b8243269e9cf_.py
+++ b/app_data/migrations/versions/b8243269e9cf_.py
@@ -27,7 +27,7 @@ def upgrade():
     for review in db.session.query(Review).all():
         if review.date_deleted == '0000-00-00 00:00:00':
              review.date_deleted = None
-        if review.date_deleted > since:
+        if review.date_deleted and review.date_deleted > since:
              review.date_deleted = None
 
     db.session.commit()


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]