Browse Source
Remove self-inclusion assertion for APIRouter
pull/14400/head
Javier Sánchez Castro
7 months ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
0 additions and
4 deletions
-
fastapi/routing.py
|
|
|
@ -1339,10 +1339,6 @@ class APIRouter(routing.Router): |
|
|
|
app.include_router(internal_router) |
|
|
|
``` |
|
|
|
""" |
|
|
|
assert self is not router, ( |
|
|
|
"Cannot include the same APIRouter instance into itself. " |
|
|
|
"Did you mean to include a different router?" |
|
|
|
) |
|
|
|
if prefix: |
|
|
|
assert prefix.startswith("/"), "A path prefix must start with '/'" |
|
|
|
assert not prefix.endswith("/"), ( |
|
|
|
|