Skip to content

Commit

Permalink
Makes param match non-greedy
Browse files Browse the repository at this point in the history
  • Loading branch information
RobRuana committed Sep 3, 2018
1 parent 14d2d67 commit 5133e9c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion uber/decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,7 @@ def with_rendering(*args, **kwargs):
raise HTTPRedirect("../common/invalid?message={}", message)
except TypeError as e:
# Very restrictive pattern so we don't accidentally match legit errors
pattern = r"^{}\(\) missing 1 required positional argument: '\S*id'$".format(func.__name__)
pattern = r"^{}\(\) missing 1 required positional argument: '\S*?id'$".format(func.__name__)
if re.fullmatch(pattern, str(e)):
message = 'Looks like you tried to access a page without all the query parameters. '\
'Please go back and try again.'
Expand Down

0 comments on commit 5133e9c

Please sign in to comment.