Skip to content

Commit

Permalink
throwing error (#163)
Browse files Browse the repository at this point in the history
* throwing error

* Update version to 5.0.7

* check based on env

---------

Co-authored-by: FSD Github Actions <fsd@levellingup.gov.uk>
  • Loading branch information
srh-sloan and FSD Github Actions authored Sep 18, 2024
1 parent 7a7c94d commit 48ed534
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions fsd_utils/config/commonconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,13 @@ class CommonConfig:
# ---------------
# General App Config
# ---------------
SECRET_KEY = os.getenv("SECRET_KEY", "secret_key")
SESSION_COOKIE_NAME = os.getenv("SESSION_COOKIE_NAME", "session_cookie")
FLASK_ENV = os.getenv("FLASK_ENV")
if not FLASK_ENV:
raise KeyError("FLASK_ENV is not present in environment")
SECRET_KEY = os.getenv("SECRET_KEY")
if not SECRET_KEY and FLASK_ENV not in ["development", "unit_test"]:
raise KeyError("SECRET_KEY is not present in environment")
SESSION_COOKIE_NAME = os.getenv("SESSION_COOKIE_NAME", "session_cookie")
try:
FSD_LOG_LEVEL = FSD_LOG_LEVELS["FLASK_ENV"]
except KeyError:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta"
[project]
name = "funding-service-design-utils"

version = "5.0.6"
version = "5.0.7"

authors = [
{ name="MHCLG", email="FundingService@communities.gov.uk" },
Expand Down

0 comments on commit 48ed534

Please sign in to comment.