Skip to content

Commit

Permalink
try fixing mypy test
Browse files Browse the repository at this point in the history
  • Loading branch information
dantownsend committed Apr 10, 2024
1 parent 4112dbe commit 1e15c0d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion piccolo_api/shared/auth/excluded_paths.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,12 @@ def check_excluded_paths(authenticate_func: t.Callable):
async def authenticate(self: AuthenticationBackend, conn: HTTPConnection):
conn_path = dict(conn)

for excluded_path in self.excluded_paths:
excluded_paths = getattr(self, "excluded_paths", None)

if not excluded_paths:
raise ValueError("excluded_paths isn't defined")

for excluded_path in excluded_paths:
if excluded_path.endswith("*"):
if (
conn_path["raw_path"]
Expand Down

0 comments on commit 1e15c0d

Please sign in to comment.