From 6a4b44071b80308dc196d50e80b2366887f5b330 Mon Sep 17 00:00:00 2001
From: Todd Dembrey <todd.dembrey@torchbox.com>
Date: Fri, 21 Dec 2018 16:50:49 +0000
Subject: [PATCH] Update to ensure we can run tests

---
 opentech/settings/base.py       | 2 +-
 opentech/settings/dev.py        | 5 +++++
 opentech/settings/production.py | 4 ----
 3 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/opentech/settings/base.py b/opentech/settings/base.py
index 492157071..9daf5607e 100644
--- a/opentech/settings/base.py
+++ b/opentech/settings/base.py
@@ -596,6 +596,6 @@ REFERRER_POLICY = env.get('SECURE_REFERRER_POLICY',
 WEBPACK_LOADER = {
     'DEFAULT': {
         'BUNDLE_DIR_NAME': 'app/',
-        'STATS_FILE': os.path.join(BASE_DIR, './opentech/static_compiled/app/webpack-stats.json'),
+        'STATS_FILE': os.path.join(BASE_DIR, './opentech/static_compiled/app/webpack-stats-prod.json'),
     }
 }
diff --git a/opentech/settings/dev.py b/opentech/settings/dev.py
index 176f00d6d..08a4d68f4 100644
--- a/opentech/settings/dev.py
+++ b/opentech/settings/dev.py
@@ -109,3 +109,8 @@ if DEBUGTOOLBAR:
     MIDDLEWARE = [
         'debug_toolbar.middleware.DebugToolbarMiddleware',
     ] + MIDDLEWARE
+
+
+WEBPACK_LOADER['DEFAULT'].update({
+    'STATS_FILE': os.path.join(BASE_DIR, './opentech/static_compiled/app/webpack-stats.json'),
+})
diff --git a/opentech/settings/production.py b/opentech/settings/production.py
index b9e649beb..ef6f4fc7c 100644
--- a/opentech/settings/production.py
+++ b/opentech/settings/production.py
@@ -21,8 +21,4 @@ if 'MAILGUN_API_KEY' in env:
         "WEBHOOK_SECRET": env.get('ANYMAIL_WEBHOOK_SECRET', None)
     }
 
-WEBPACK_LOADER['DEFAULT'].update({
-    'STATS_FILE': os.path.join(BASE_DIR, './opentech/static_compiled/app/webpack-stats-prod.json'),
-})
-
 django_heroku.settings(locals())
-- 
GitLab