From 41f5f74589434664c3265c86813e3a148b8fc78f Mon Sep 17 00:00:00 2001 From: Joseph Semrai Date: Tue, 24 Dec 2019 12:58:17 -0500 Subject: [PATCH 1/5] Add alternative key method --- components/core/utils/app_constants.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/components/core/utils/app_constants.py b/components/core/utils/app_constants.py index 9a141878..61bc6f4c 100644 --- a/components/core/utils/app_constants.py +++ b/components/core/utils/app_constants.py @@ -1 +1,2 @@ -SERVER_SECRET_KEY = "123456789" +import os +SERVER_SECRET_KEY = os.environ['BASSA_SERVER_KEY'] From f5da3216c4551c8bc13f85b4c0ae0d62ed630cdc Mon Sep 17 00:00:00 2001 From: Joseph Semrai Date: Tue, 24 Dec 2019 19:22:52 -0500 Subject: [PATCH 2/5] Fix Codacy errors --- components/core/utils/app_constants.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/core/utils/app_constants.py b/components/core/utils/app_constants.py index 61bc6f4c..96dddf1d 100644 --- a/components/core/utils/app_constants.py +++ b/components/core/utils/app_constants.py @@ -1,2 +1,2 @@ import os -SERVER_SECRET_KEY = os.environ['BASSA_SERVER_KEY'] +SERVER_SECRET_KEY = os.environ['BASSA_SERVER_KEY'] From ca66cf384137c223c47cca5ee6924c949084a734 Mon Sep 17 00:00:00 2001 From: Joseph Semrai Date: Tue, 24 Dec 2019 22:39:33 -0500 Subject: [PATCH 3/5] Use os.environ.get --- components/core/utils/app_constants.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/core/utils/app_constants.py b/components/core/utils/app_constants.py index 96dddf1d..94e58487 100644 --- a/components/core/utils/app_constants.py +++ b/components/core/utils/app_constants.py @@ -1,2 +1,2 @@ import os -SERVER_SECRET_KEY = os.environ['BASSA_SERVER_KEY'] +SERVER_SECRET_KEY = os.environ.get(BASSA_SERVER_KEY) From 267bdd02520320a5f6401b7379037b57d80edd8c Mon Sep 17 00:00:00 2001 From: Joseph Semrai Date: Tue, 24 Dec 2019 22:44:08 -0500 Subject: [PATCH 4/5] Change reference to string --- components/core/utils/app_constants.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/core/utils/app_constants.py b/components/core/utils/app_constants.py index 94e58487..6bc70748 100644 --- a/components/core/utils/app_constants.py +++ b/components/core/utils/app_constants.py @@ -1,2 +1,2 @@ import os -SERVER_SECRET_KEY = os.environ.get(BASSA_SERVER_KEY) +SERVER_SECRET_KEY = os.environ.get('BASSA_SERVER_KEY') From 3b7ba2f2b76e996a1901974b0c17115d57b8ad62 Mon Sep 17 00:00:00 2001 From: Joseph Semrai Date: Tue, 24 Dec 2019 12:58:17 -0500 Subject: [PATCH 5/5] Add alternative key method Fix Codacy errors Use os.environ.get Change reference to string --- components/core/utils/app_constants.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/components/core/utils/app_constants.py b/components/core/utils/app_constants.py index 9a141878..6bc70748 100644 --- a/components/core/utils/app_constants.py +++ b/components/core/utils/app_constants.py @@ -1 +1,2 @@ -SERVER_SECRET_KEY = "123456789" +import os +SERVER_SECRET_KEY = os.environ.get('BASSA_SERVER_KEY')