0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-03-18 02:21:47 -05:00
ghost/core
Fabien 'egg' O'Carroll 6a7cd9856e
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:56:05 +01:00
..
client@efc3dc259b Updated Admin to v4.12.1 2021-08-17 17:21:45 +01:00
frontend Switched post routing to uuid instead of slug 2021-08-19 12:27:45 +04:00
server Fixed imports for files missing the email_only key (#13284) 2021-09-06 11:56:05 +01:00
shared Moved email list check to GA 2021-08-20 18:07:31 +04:00
app.js
boot.js Added email unfreeze for verified email config 2021-07-29 20:30:30 +12:00
bridge.js Added comments to all usages of lib/common/events 2021-07-07 16:02:44 +01:00