mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-03 08:25:06 +03:00
🐛 Fixed broken activity feed and click filter
fixes https://github.com/TryGhost/Ghost/issues/15515 - The link relation of a member-click-event was still using the link_id as foreign key instead of redirect_id. - The members_link_click_events table was renamed to members_click_events, but this change was not reflected in a recent change in the member model (which has the custom filters).
This commit is contained in:
parent
a7556ad9ea
commit
b80c2cd81b
@ -5,7 +5,7 @@ const MemberClickEvent = ghostBookshelf.Model.extend({
|
||||
tableName: 'members_click_events',
|
||||
|
||||
link() {
|
||||
return this.belongsTo('Redirect', 'link_id');
|
||||
return this.belongsTo('Redirect', 'redirect_id');
|
||||
},
|
||||
|
||||
member() {
|
||||
|
@ -100,12 +100,12 @@ const Member = ghostBookshelf.Model.extend({
|
||||
joinFrom: 'member_id'
|
||||
},
|
||||
clicked_links: {
|
||||
tableName: 'link_redirects',
|
||||
tableName: 'redirects',
|
||||
tableNameAs: 'clicked_links',
|
||||
type: 'manyToMany',
|
||||
joinTable: 'members_link_click_events',
|
||||
joinTable: 'members_click_events',
|
||||
joinFrom: 'member_id',
|
||||
joinTo: 'link_id'
|
||||
joinTo: 'redirect_id'
|
||||
},
|
||||
emails: {
|
||||
tableName: 'emails',
|
||||
|
Loading…
Reference in New Issue
Block a user