Skip to content

Commit

Permalink
Merge pull request #844 from longguikeji/feature-fix-url-namespace
Browse files Browse the repository at this point in the history
fix: 🐛 fix tenant url namespace
  • Loading branch information
luolu-lg authored May 20, 2022
2 parents c48261d + b18f6b8 commit 600e272
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arkid/core/extension/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ def register_routers(self, urls_ext:List[partial], tenant_urls=False):
tenant_urls (bool, optional): 是否要添加 tenant/{tenant_id}/ 前缀. Defaults to False.
"""
if tenant_urls:
urls_ext = [re_path(r'tenant/(?P<tenant_id>[\w-]+)/', include((urls_ext, 'extension'), namespace=f'{self.name}'))]
urls_ext = [re_path(r'tenant/(?P<tenant_id>[\w-]+)/', include((urls_ext, 'extension'), namespace=f'{self.name}_tenant'))]
self.urls.extend(urls_ext)
core_urls.register(urls_ext)
else:
Expand Down

0 comments on commit 600e272

Please sign in to comment.