mirror of https://github.com/tiangolo/fastapi.git
Remove self-inclusion assertion for APIRouter
This commit is contained in:
parent
e4871bc4d5
commit
fe49c85e9e
|
|
@ -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("/"), (
|
||||
|
|
|
|||
Loading…
Reference in New Issue