Skip to content

Commit 81b3f9f

Browse files
committed
perf: Use url_path_for to get the login page path
1 parent bf28dfe commit 81b3f9f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

fastapi_amis_admin/admin/admin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ def error_no_page_permission(self, request: Request):
395395
status_code=status.HTTP_307_TEMPORARY_REDIRECT,
396396
detail="No page permissions",
397397
headers={
398-
"location": f"{self.app.site.router_path}/auth/form/login?redirect={request.url.path}",
398+
"location": f"{self.site.router_path}{self.site.router.url_path_for('login')}?redirect={request.url.path}",
399399
},
400400
)
401401

0 commit comments

Comments
 (0)