Skip to content

Commit 99b96fc

Browse files
authored
Merge pull request #79 from aboutcode-org/conf-captcha-test-key
Default to test key if no captcha key is supplied
2 parents 6c9952c + b8b92fe commit 99b96fc

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ env:
1313

1414
jobs:
1515
build:
16-
runs-on: ubuntu-20.04
16+
runs-on: ubuntu-22.04
1717

1818
services:
1919
postgres:

.github/workflows/pypi-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ on:
2121
jobs:
2222
build-pypi-distribs:
2323
name: Build and publish library to PyPI
24-
runs-on: ubuntu-20.04
24+
runs-on: ubuntu-22.04
2525

2626
steps:
2727
- uses: actions/checkout@v3

federatedcode/settings.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,13 @@
6161
FEDERATEDCODE_CLIENT_ID = env.str("FEDERATEDCODE_CLIENT_ID")
6262
FEDERATEDCODE_CLIENT_SECRET = env.str("FEDERATEDCODE_CLIENT_SECRET")
6363

64-
RECAPTCHA_PUBLIC_KEY = env.str("RECAPTCHA_PUBLIC_KEY", "")
65-
RECAPTCHA_PRIVATE_KEY = env.str("RECAPTCHA_PRIVATE_KEY", "")
66-
SILENCED_SYSTEM_CHECKS = ["captcha.recaptcha_test_key_error"]
64+
if env.str("RECAPTCHA_PUBLIC_KEY", None):
65+
RECAPTCHA_PUBLIC_KEY = env.str("RECAPTCHA_PUBLIC_KEY")
66+
67+
if env.str("RECAPTCHA_PRIVATE_KEY", None):
68+
RECAPTCHA_PRIVATE_KEY = env.str("RECAPTCHA_PRIVATE_KEY")
69+
70+
SILENCED_SYSTEM_CHECKS = ["django_recaptcha.recaptcha_test_key_error"]
6771
RECAPTCHA_DOMAIN = env.str("RECAPTCHA_DOMAIN", "www.recaptcha.net")
6872

6973
# Application definition

0 commit comments

Comments
 (0)