merge from main

This commit is contained in:
Kenneth Kehl
2024-06-20 12:57:15 -07:00
6 changed files with 26 additions and 8 deletions

View File

@@ -9,10 +9,10 @@ runs:
sudo apt-get update \
&& sudo apt-get install -y --no-install-recommends \
libcurl4-openssl-dev
- name: Set up Python 3.12
- name: Set up Python 3.12.2
uses: actions/setup-python@v4
with:
python-version: "3.12"
python-version: "3.12.2"
- name: Install poetry
shell: bash
run: pip install poetry

View File

@@ -21,8 +21,8 @@ bootstrap: generate-version-file ## Set up everything to run the app
poetry install --sync --no-root
poetry run playwright install --with-deps
poetry run pre-commit install
source $(NVMSH) --no-use && nvm install && npm ci --no-audit
source $(NVMSH) && npm install
source $(NVMSH) --no-use && nvm install && npm install
source $(NVMSH) && npm ci --no-audit
source $(NVMSH) && npm run build
.PHONY: watch-frontend

View File

@@ -233,6 +233,24 @@ def create_app(application):
)
logging.init_app(application)
# Hopefully will help identify if there is a race condition causing the CSRF errors
# that we have occasionally seen in our environments.
for key in ("SECRET_KEY", "DANGEROUS_SALT"):
try:
value = application.config[key]
except KeyError:
application.logger.error(f"Env Var {key} doesn't exist.")
else:
try:
data_len = len(value.strip())
except (TypeError, AttributeError):
application.logger.error(f"Env Var {key} invalid type: {type(value)}")
else:
if data_len:
application.logger.info(f"Env Var {key} is a non-zero length.")
else:
application.logger.error(f"Env Var {key} is empty.")
login_manager.login_view = "main.sign_in"
login_manager.login_message_category = "default"
login_manager.session_protection = None

4
poetry.lock generated
View File

@@ -3111,5 +3111,5 @@ files = [
[metadata]
lock-version = "2.0"
python-versions = "^3.12.2"
content-hash = "b45f2c38493f81bd7fc9d4bfd294b001d71e4082380eb0851d4f3ea8dcdb949c"
python-versions = "==3.12.2"
content-hash = "13525f32422aad8324a3bcb3629d326cc847029800d5518e1efd047b887afa8b"

View File

@@ -7,7 +7,7 @@ readme = "README.md"
package-mode = false
[tool.poetry.dependencies]
python = "^3.12.2"
python = "==3.12.2"
ago = "~=0.0.95"
beautifulsoup4 = "^4.12.3"
blinker = "~=1.8"

View File

@@ -1 +1 @@
python-3.12.x
python-3.12.2