No longer raising a missing parameter when value is null

When passing a null value as parameter (ex.: 0, None or False), Sanic said "Error: Required parameter `param` was not passed to url_for"

Example:

```
@app.route("/<idx>")
def route(rq, idx):
    pass
```

```
url_for("route", idx=0)
```

No longer raises: `Error: Required parameter `idx` was not passed to url_for`
This commit is contained in:
NyanKiyoshi 2018-01-26 21:13:43 +01:00 committed by GitHub
parent 72d56a89a2
commit 285ad9bdc1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -495,7 +495,7 @@ class Sanic:
specific_pattern = '^{}$'.format(pattern)
supplied_param = None
if kwargs.get(name):
if name in kwargs:
supplied_param = kwargs.get(name)
del kwargs[name]
else: