Skip to content

Commit

Permalink
fix swagger & openapi.json reverse error under nested namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
valbendan committed Dec 25, 2020
1 parent 1cb1c83 commit 4bc20c0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ninja/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,10 @@ def urls(self):
return (
self._get_urls(),
"ninja",
self.urls_namespace,
# under nested namespace,
# wo only need last part for register
# use full part to `reverse`
self.urls_namespace.split(":")[-1],
)

def _get_urls(self):
Expand Down

0 comments on commit 4bc20c0

Please sign in to comment.