Browse Source

Incorporate some feedback from florian.vuillemot

pull/49/head
Reinhard Müller 2 weeks ago
parent
commit
2208e7052e
2 changed files with 4 additions and 4 deletions
  1. 1
    1
      README.md
  2. 3
    3
      fsfe_forms/views.py

+ 1
- 1
README.md View File

@@ -210,7 +210,7 @@ generate this URL yourself.

Configuration of the applications is done in the file `applications.json`. It
contains an object where each key is an application id and the value is the
matchin application configuration.
matching application configuration.

The application configuration is again an object with the following possible
keys:

+ 3
- 3
fsfe_forms/views.py View File

@@ -41,7 +41,7 @@ def _find_app_config(appid):
try:
return current_app.app_configs[appid]
except KeyError:
abort(404, 'No application configuration for "{}"'.format(appid))
abort(404, f'No application configuration for "{appid}"')


# -----------------------------------------------------------------------------
@@ -91,11 +91,11 @@ def email(appid, lang):
# Validate required parameters
for field in app_config['required_vars']:
if field not in params:
raise abort(400, '\"%s\" is required' % field)
raise abort(400, f'"{field}" is required')

if 'confirm' in app_config: # With double opt-in
if params.get('confirm') is None:
abort(400, '\"Confirm\" address is required')
abort(400, '"Confirm" address is required')

# Optionally, check for a confirmed previous registration, and if
# found, refuse the duplicate

Loading…
Cancel
Save