You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by gc...@apache.org on 2022/07/25 20:21:17 UTC
[allura] branch master updated: [#8446] append '/profile' to only valid users on activity stream
This is an automated email from the ASF dual-hosted git repository.
gcruz pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/allura.git
The following commit(s) were added to refs/heads/master by this push:
new 639f141da [#8446] append '/profile' to only valid users on activity stream
639f141da is described below
commit 639f141dac26326f05c3d63b0be8a65666a407a9
Author: Guillermo Cruz <gu...@slashdotmedia.com>
AuthorDate: Mon Jul 25 14:19:30 2022 -0600
[#8446] append '/profile' to only valid users on activity stream
---
ForgeActivity/forgeactivity/main.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/ForgeActivity/forgeactivity/main.py b/ForgeActivity/forgeactivity/main.py
index d074f02fc..774261c7e 100644
--- a/ForgeActivity/forgeactivity/main.py
+++ b/ForgeActivity/forgeactivity/main.py
@@ -149,7 +149,8 @@ class ForgeActivityController(BaseController):
t.actor.activity_extras.icon_url = re.sub(r'([&?])d=[^&]*',
r'\1d={}'.format(default_avatar),
t.actor.activity_extras.icon_url)
- t.actor.activity_url = f'{t.actor.activity_url}profile/'
+ if t.actor.activity_url:
+ t.actor.activity_url = f'{t.actor.activity_url}profile/'
should_noindex = any(name in noindex_tags for name in t.tags)
t.obj.noindex = should_noindex