Skip to content

Commit f138707

Browse files
committed
allow empty prefix and no lead slash in bp route
1 parent 6b2127b commit f138707

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

flask/blueprints.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def add_url_rule(self, rule, endpoint=None, view_func=None, **options):
6565
to the application. The endpoint is automatically prefixed with the
6666
blueprint's name.
6767
"""
68-
if self.url_prefix:
68+
if self.url_prefix is not None:
6969
rule = '/'.join((self.url_prefix, rule.lstrip('/')))
7070
options.setdefault('subdomain', self.subdomain)
7171
if endpoint is None:

0 commit comments

Comments
 (0)