0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-20 22:42:53 -05:00

Loaded Action model after all other models

no-issue

The Action model loops through all registered models when the file is
loaded, by loading the model last, we ensure that it can read all
models, rather than an arbitrary selection which come before it.
This commit is contained in:
Fabien O'Carroll 2020-10-14 11:50:39 +01:00 committed by Fabien 'egg' O'Carroll
parent 0fd0527da0
commit a9b3d83e00

View file

@ -28,7 +28,6 @@ const models = [
'api-key',
'mobiledoc-revision',
'member',
'action',
'posts-meta',
'member-stripe-customer',
'stripe-customer-subscription',
@ -36,7 +35,10 @@ const models = [
'email-batch',
'email-recipient',
'label',
'single-use-token'
'single-use-token',
// Action model MUST be loaded last as it loops through all of the registered models
// Please do not append items to this array.
'action'
];
function init() {