Skip to content

Commit

Permalink
add if-then-else
Browse files Browse the repository at this point in the history
  • Loading branch information
Caratpine authored Aug 19, 2017
1 parent 2f05076 commit 5a171ff
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion flask/blueprints.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,8 @@ def add_url_rule(self, rule, endpoint=None, view_func=None, **options):
"""
if endpoint:
assert '.' not in endpoint, "Blueprint endpoints should not contain dots"
assert '.' not in view_func.__name__, "Blueprint view function name should not contain dots"
if view_func:
assert '.' not in view_func.__name__, "Blueprint view function name should not contain dots"
self.record(lambda s:
s.add_url_rule(rule, endpoint, view_func, **options))

Expand Down

0 comments on commit 5a171ff

Please sign in to comment.