request.args.getlist() returns [] if missing, refs #774

Also added some unit tests for request.args
This commit is contained in:
Simon Willison 2020-05-29 15:51:30 -07:00
commit 84616a2364
4 changed files with 14 additions and 4 deletions

View file

@ -761,9 +761,9 @@ class RequestParameters(dict):
except (KeyError, TypeError):
return default
def getlist(self, name, default=None):
def getlist(self, name):
"Return full list"
return super().get(name, default)
return super().get(name) or []
class ConnectionProblem(Exception):