Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.

Commit 8fb9690

Browse files
committed
Add v3.40.4
1 parent 16b0286 commit 8fb9690

File tree

4 files changed

+14
-12
lines changed

4 files changed

+14
-12
lines changed

core/server/models/email-recipient.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,6 @@ const EmailRecipient = ghostBookshelf.Model.extend({
44
tableName: 'email_recipients',
55
hasTimestamps: false,
66

7-
relationships: ['email'],
8-
9-
relationshipBelongsTo: {
10-
email: 'emails'
11-
},
12-
137
email() {
148
return this.belongsTo('Email', 'email_id');
159
},

core/server/models/member.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,14 @@ const Member = ghostBookshelf.Model.extend({
1919

2020
relationships: ['labels', 'stripeCustomers', 'email_recipients'],
2121

22+
// do not delete email_recipients records when a member is destroyed. Recipient
23+
// records are used for analytics and historical records
24+
relationshipConfig: {
25+
email_recipients: {
26+
destroyRelated: false
27+
}
28+
},
29+
2230
relationshipBelongsTo: {
2331
labels: 'labels',
2432
stripeCustomers: 'members_stripe_customers',

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ghost",
3-
"version": "3.40.3",
3+
"version": "3.40.4",
44
"description": "The professional publishing platform",
55
"author": "Ghost Foundation",
66
"homepage": "https://ghost.org",
@@ -74,7 +74,7 @@
7474
"bluebird": "3.7.2",
7575
"body-parser": "1.19.0",
7676
"bookshelf": "0.15.2",
77-
"bookshelf-relations": "1.3.2",
77+
"bookshelf-relations": "1.4.1",
7878
"brute-knex": "4.0.1",
7979
"bson-objectid": "1.3.1",
8080
"bthreads": "0.5.1",

yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1366,10 +1366,10 @@ body@^5.1.0:
13661366
raw-body "~1.1.0"
13671367
safe-json-parse "~1.0.1"
13681368

1369-
bookshelf-relations@1.3.2:
1370-
version "1.3.2"
1371-
resolved "https://registry.yarnpkg.com/bookshelf-relations/-/bookshelf-relations-1.3.2.tgz#bceb0ab3b172b01a48a81eed16cd68446975515a"
1372-
integrity sha512-LrsWiO3kKfYCTGWxCVzFuEi/hIfukRz6n3KIcQqCFaAO/PmYxFtxarMGeVKDpL/hm1BudksrK7S9vXmkfgv8eQ==
1369+
bookshelf-relations@1.4.1:
1370+
version "1.4.1"
1371+
resolved "https://registry.yarnpkg.com/bookshelf-relations/-/bookshelf-relations-1.4.1.tgz#10e651136193ec3edac8b30f380b66ec635634c7"
1372+
integrity sha512-CUmE7TiNh4BBYvJM05BJCT8e1XdPcClBHc6d3gIEvRlgciTx0hPAVj2zoOe4WdmzB7qU4ur/kcv/T4N4FSs3Jw==
13731373
dependencies:
13741374
bluebird "3.7.2"
13751375
ghost-ignition "4.1.0"

0 commit comments

Comments
 (0)