Ghost/ghost/members-importer
Rishabh Garg 8a598fe721
🐛 Fixed member importer crash for failed imports (#15560)
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
2022-10-07 19:15:18 +05:30
..
lib 🐛 Fixed member importer crash for failed imports (#15560) 2022-10-07 19:15:18 +05:30
test 🐛 Fixed empty error csv file for member imports (#15274) 2022-08-24 00:49:30 +05:30
.eslintrc.js
index.js Fixed default package export 2021-07-22 01:53:21 +12:00
package.json Update Test & linting packages 2022-10-05 00:36:08 +00:00