summaryrefslogtreecommitdiffstats
path: root/src/lib/Server/Reports
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/Server/Reports')
-rw-r--r--src/lib/Server/Reports/settings.py3
-rw-r--r--src/lib/Server/Reports/updatefix.py8
2 files changed, 8 insertions, 3 deletions
diff --git a/src/lib/Server/Reports/settings.py b/src/lib/Server/Reports/settings.py
index 81220c0e3..9efe38552 100644
--- a/src/lib/Server/Reports/settings.py
+++ b/src/lib/Server/Reports/settings.py
@@ -49,7 +49,8 @@ if DATABASE_ENGINE == 'sqlite3' and DATABASE_NAME == '':
try:
TIME_ZONE = c.get('statistics', 'time_zone')
except:
- TIME_ZONE = 'America/Chicago'
+ if django.VERSION[0] == 1 and django.VERSION[1] > 2:
+ TIME_ZONE = None
# Language code for this installation. All choices can be found here:
# http://www.w3.org/TR/REC-html40/struct/dirlang.html#langcodes
diff --git a/src/lib/Server/Reports/updatefix.py b/src/lib/Server/Reports/updatefix.py
index 6d9b5e952..f8fca1f90 100644
--- a/src/lib/Server/Reports/updatefix.py
+++ b/src/lib/Server/Reports/updatefix.py
@@ -139,8 +139,12 @@ def dosync():
fresh = True
# ensure database connection are close, so that the management can do it's job right
- cursor.close()
- connection.close()
+ try:
+ cursor.close()
+ connection.close()
+ except:
+ # ignore any errors from missing/invalid dbs
+ pass
# Do the syncdb according to the django version
if "call_command" in dir(django.core.management):
# this is available since django 1.0 alpha.