diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 127d9fd..31d9614 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -13,7 +13,7 @@ env: jobs: build: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 services: postgres: diff --git a/.github/workflows/pypi-release.yml b/.github/workflows/pypi-release.yml index 9585730..e535322 100644 --- a/.github/workflows/pypi-release.yml +++ b/.github/workflows/pypi-release.yml @@ -21,7 +21,7 @@ on: jobs: build-pypi-distribs: name: Build and publish library to PyPI - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v3 diff --git a/federatedcode/settings.py b/federatedcode/settings.py index 07d36e5..c1cfc25 100644 --- a/federatedcode/settings.py +++ b/federatedcode/settings.py @@ -61,9 +61,13 @@ FEDERATEDCODE_CLIENT_ID = env.str("FEDERATEDCODE_CLIENT_ID") FEDERATEDCODE_CLIENT_SECRET = env.str("FEDERATEDCODE_CLIENT_SECRET") -RECAPTCHA_PUBLIC_KEY = env.str("RECAPTCHA_PUBLIC_KEY", "") -RECAPTCHA_PRIVATE_KEY = env.str("RECAPTCHA_PRIVATE_KEY", "") -SILENCED_SYSTEM_CHECKS = ["captcha.recaptcha_test_key_error"] +if env.str("RECAPTCHA_PUBLIC_KEY", None): + RECAPTCHA_PUBLIC_KEY = env.str("RECAPTCHA_PUBLIC_KEY") + +if env.str("RECAPTCHA_PRIVATE_KEY", None): + RECAPTCHA_PRIVATE_KEY = env.str("RECAPTCHA_PRIVATE_KEY") + +SILENCED_SYSTEM_CHECKS = ["django_recaptcha.recaptcha_test_key_error"] RECAPTCHA_DOMAIN = env.str("RECAPTCHA_DOMAIN", "www.recaptcha.net") # Application definition