0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-20 22:42:53 -05:00
ghost/core/server/models
Fabien O'Carroll 33910db1ec
🐛 Fixed Member model removing labels when unset
closes https://github.com/TryGhost/Ghost/issues/12600

The bookshelf-relations plugin which we use will **remove** all
relations when they are set to an empty array, but will leave them alone
if it's set to undefined.

Our logic to deduplicate uppercase & lowercase version of the same label
was in advertently always setting the labels to an array, but when the
model was saved without passing the labels, this array would be empty.

Here we've added a check which will skip all label handling, if there
are no labels set.
2021-02-08 09:44:47 +00:00
..
base Added acceptance test for /member/:id/?include=email_recipients (#12477) 2020-12-11 18:45:35 +00:00
plugins Added email.open_rate order option to posts api (#12439) 2020-12-03 20:13:37 +00:00
relations Extracted promise libs and history into @tryghost/promise 2020-08-11 18:44:21 +01:00
action.js
api-key.js Added the user_id field to the api_keys table 2020-11-20 09:53:18 +01:00
author.js
email-batch.js Fixed creation of EmailBatch and EmailRecipient collections 2020-10-14 15:11:45 +01:00
email-recipient.js Removed unnecessary bookshelf-relations config in EmailRecipient model 2021-01-05 15:28:30 +00:00
email.js Added migrations for email analytics (#12387) 2020-11-25 17:48:24 +00:00
index.js Added basic CRUD admin API for snippets 2020-10-16 18:02:58 +01:00
integration.js
invite.js Extracted core/server/lib/security to @tryghost/security package 2020-08-11 14:06:50 +01:00
label.js
member-stripe-customer.js Added error handling for failed member imports 2020-08-26 17:11:35 +12:00
member.js 🐛 Fixed Member model removing labels when unset 2021-02-08 09:44:47 +00:00
mobiledoc-revision.js
permission.js
post.js Updated links to ghost.org sites 2021-01-20 09:59:45 +13:00
posts-meta.js
role.js
session.js
settings.js Removed invalid default 'core' value in settings type 2021-01-04 15:32:57 +13:00
single-use-token.js 🐛 Added multiple use grace period to tokens (#12519) 2021-01-18 17:03:41 +00:00
snippet.js Added basic CRUD admin API for snippets 2020-10-16 18:02:58 +01:00
stripe-customer-subscription.js Included cancellation_reason in subscription serialization (#12411) 2020-11-23 21:19:27 +00:00
tag-public.js
tag.js
user.js Added the user_id field to the api_keys table 2020-11-20 09:53:18 +01:00
webhook.js