mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-26 20:34:02 +03:00
8a598fe721
refs/closes https://github.com/TryGhost/Team/issues/2004 - for imports, members are created inside a transaction, which causes the member created events to be dispatched. - its possible that transactions for import can be rolled back if for some reason there is an error down the line while inserting other member properties. The rollback doesn't commit the member to DB, but the event dispatched earlier will still try to create the member created event which fails due to missing member id. - knex transactions resolve the `executionPromise` both in case of explicit commit or rollback from the user, so just the transaction end check will not be good enough to make sure the member exists in DB - adds explicit config to knex to reject transaction in case of rollback, which is then caught and event is not dispatched |
||
---|---|---|
.. | ||
lib | ||
test | ||
.eslintrc.js | ||
index.js | ||
package.json |