Skip to content

Commit

Permalink
Merge pull request #8020 from qld-gov-au/github-7980-activity-stream-…
Browse files Browse the repository at this point in the history
…exception

preserve custom org type in user activity streams
  • Loading branch information
smotornyuk committed Jan 22, 2024
2 parents 3083f06 + 96a3a22 commit 9061a42
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions changes/7980.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
use custom group type from the activity object if it's not supplied, eg on user activity streams
1 change: 1 addition & 0 deletions ckanext/activity/templates/snippets/stream.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
{% endmacro %}

{% macro organization(activity) %}
{% set group_type = group_type or (activity.data.group.type if (activity.data.group and activity.data.group.type) else 'organization') %}
<a href="{{ h.url_for(group_type ~ '.read', id=activity.object_id) }}">
{{ activity.data.group.title if activity.data.group else _('unknown') }}
</a>
Expand Down

0 comments on commit 9061a42

Please sign in to comment.