GEWIS / sudosos-backend

SudoSOS is a Node.js-based Bar and POS system made for study association GEWIS.
https://sudosos.gewis.nl
GNU Affero General Public License v3.0
6 stars 3 forks source link

Seeder does not work on develop #147

Closed CodeNamedRobin closed 3 months ago

CodeNamedRobin commented 8 months ago

Expected: npm run seed runs clean, without errors. Actual: npm run seed gives error about subtransactions not being defined.

[2024-01-27T19:25:54.641] [ERROR] Seeder - Seeding failed TypeError: Cannot read properties of undefined (reading 'subTransactionRows') at TransactionSubscriber.afterInsert (C:\SudoSOS\sudosos-backend\src\subscriber\transaction-subscriber.ts:50:51) at async Promise.all (index 1) at SubjectExecutor.execute (C:\SudoSOS\sudosos-backend\src\persistence\SubjectExecutor.ts:185:17) at EntityPersistExecutor.execute (C:\SudoSOS\sudosos-backend\src\persistence\EntityPersistExecutor.ts:197:21) at async Promise.all (index 72) at seedTransactions (C:\SudoSOS\sudosos-backend\test\seed.ts:982:3) at seedDatabase (C:\SudoSOS\sudosos-backend\test\seed.ts:1406:28) at createApp (C:\SudoSOS\sudosos-backend\src\database\seed.ts:48:5)

JustSamuel commented 8 months ago

Iirc this is about an empty transaction for which the subscriber fails. It doesn't interfere with the actual seeding. But its good to fix it anyhow,

JustSamuel commented 3 months ago

Should be fixed, re-open if you find that it is still not working.