This is an automated email from the ASF dual-hosted git repository.
gcruz pushed a commit to branch gc/8518
in repository https://gitbox.apache.org/repos/asf/allura.git
The following commit(s) were added to refs/heads/gc/8518 by this push:
new 3cf603087 [#8518] updated redirection to reflect branch changes
3cf603087 is described below
commit 3cf603087ea0ac56a9ab6bc988b06b922bb9dd55
Author: Guillermo Cruz <[email protected]>
AuthorDate: Tue Aug 8 16:17:46 2023 -0600
[#8518] updated redirection to reflect branch changes
---
Allura/allura/lib/repository.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/Allura/allura/lib/repository.py b/Allura/allura/lib/repository.py
index a64f2c6dd..1ed396850 100644
--- a/Allura/allura/lib/repository.py
+++ b/Allura/allura/lib/repository.py
@@ -295,7 +295,9 @@ class RepoAdminController(DefaultAdminController):
def set_default_branch_name(self, branch_name=None, **kw):
if (request.method == 'POST') and branch_name:
self.repo.set_default_branch(branch_name)
- redirect(six.ensure_text(request.referer or '/'))
+ project_url = self.repo.default_url_path(c.project,
self.app.config.tool_name)
+ mount_point = self.app.config.options.mount_point
+ redirect(six.ensure_text(f'{project_url}{mount_point}/' or '/'))
else:
return dict(app=self.app,
default_branch_name=self.app.default_branch_name)