Ghost/core/server/data
Fabien 'egg' O'Carroll 90a4d369db
Fixed imports for files missing the email_only key (#13284)
closes https://github.com/TryGhost/Team/issues/1024

Our importer would set the default value of all posts_meta keys to
`null`. This is an invalid value for the `email_only` key which only
accepts booleans.

Since we are already looping over the schema to create the default
values, we can use the `defaultTo` property in the schema to use the
intended default, and fall back to `null` if it doesn't exist.

We've used the `Reflect.has` function to determine if the `defaultTo`
key exists, as opposed to a truthy check, because it's possible that a
falsy value (e.g. false, in the case of email_only) can be used as the
default.
2021-09-06 11:51:42 +01:00
..
db Change to use @tryghost/logging 2021-06-15 15:59:11 +01:00
exporter Added members_product_events table (#13236) 2021-08-23 16:29:15 +02:00
importer Fixed imports for files missing the email_only key (#13284) 2021-09-06 11:51:42 +01:00
migrations Gave Administrators permission to connect to Stripe (#13228) 2021-08-26 11:00:40 +01:00
schema Gave Administrators permission to connect to Stripe (#13228) 2021-08-26 11:00:40 +01:00