diff options
| author | Barry Warsaw | 2015-04-15 10:43:56 -0400 |
|---|---|---|
| committer | Barry Warsaw | 2015-04-15 10:43:56 -0400 |
| commit | 21b6943debd12275a618301340508e2ba827a9c4 (patch) | |
| tree | 04c4ba70bde5213616fc8f7a3b78d0dc904fe58d /src/mailman/rest/validator.py | |
| parent | 67fd8d6dbcf8849b3c2f8cb42a10aed465ace76c (diff) | |
| parent | cfbffa2ac1c5b6743705d3cc39d663eb642e7184 (diff) | |
| download | mailman-21b6943debd12275a618301340508e2ba827a9c4.tar.gz mailman-21b6943debd12275a618301340508e2ba827a9c4.tar.zst mailman-21b6943debd12275a618301340508e2ba827a9c4.zip | |
Diffstat (limited to 'src/mailman/rest/validator.py')
| -rw-r--r-- | src/mailman/rest/validator.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mailman/rest/validator.py b/src/mailman/rest/validator.py index d09886e36..720d7adc1 100644 --- a/src/mailman/rest/validator.py +++ b/src/mailman/rest/validator.py @@ -68,7 +68,9 @@ def language_validator(code): def list_of_strings_validator(values): - """Turn a list of things into a list of unicodes.""" + """Turn a list of things, or a single thing, into a list of unicodes.""" + if not isinstance(values, (list, tuple)): + values = [values] for value in values: if not isinstance(value, str): raise ValueError('Expected str, got {!r}'.format(value)) |
