Bug fix for host parameter issue with lists (#1776)
* Bug fix for host parameter issue with lists As explained in #1772 there is an issue when using a list as an argument for the host parameter in the Blueprint.route() decorator. I've traced the issue back to this line, and the if conditional should ensure that the name attribute isn't accessed when route is None. * Unit tests for blueprint.route host paramter set to list. Co-authored-by: Adam Hopkins <admhpkns@gmail.com>
This commit is contained in:
@@ -143,7 +143,7 @@ class Blueprint:
|
||||
if _routes:
|
||||
routes += _routes
|
||||
|
||||
route_names = [route.name for route in routes]
|
||||
route_names = [route.name for route in routes if route]
|
||||
# Middleware
|
||||
for future in self.middlewares:
|
||||
if future.args or future.kwargs:
|
||||
|
||||
Reference in New Issue
Block a user