-
-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Labels
backendbugSomething isn't workingSomething isn't workingpriority: lowTasks that are nice to have or lower impact. These can be addressed as time allowsTasks that are nice to have or lower impact. These can be addressed as time allows
Description
Describe the bug
Button Delete all event data throws an error when the event has checked checkbox Relay. Deleting competitors works fine.
To Reproduce
Steps to reproduce the behavior:
- Create relay event and upload data
- Push the button
Delete all event datainDanger zone - Confirm the dialog
Expected behavior
All data should be deleted without error.
Screenshots
Additional context
I guess that delete in team table is missing.
Log
OPTIONS /rest/v1/events/cmj1w087q0001sl5w20edb0vm/delete-data 204 0 - 0.107 ms
Failed to delete all event data: PrismaClientKnownRequestError:
Invalid `prisma.class.deleteMany()` invocation:
Foreign key constraint violated on the fields: (`classId`)
at ei.handleRequestError (D:\Coding\orienteerfeed\ofeed\node_modules\.pnpm\@[email protected]_prism_0ade0c2032e7f19289902b884120cfab\node_modules\@prisma\client\runtime\library.js:121:7268)
at ei.handleAndLogRequestError (D:\Coding\orienteerfeed\ofeed\node_modules\.pnpm\@[email protected]_prism_0ade0c2032e7f19289902b884120cfab\node_modules\@prisma\client\runtime\library.js:121:6593)
at ei.request (D:\Coding\orienteerfeed\ofeed\node_modules\.pnpm\@[email protected]_prism_0ade0c2032e7f19289902b884120cfab\node_modules\@prisma\client\runtime\library.js:121:6300)
at async a (D:\Coding\orienteerfeed\ofeed\node_modules\.pnpm\@[email protected]_prism_0ade0c2032e7f19289902b884120cfab\node_modules\@prisma\client\runtime\library.js:130:9551)
at async deleteAllEventData (file:///D:/Coding/orienteerfeed/ofeed/apps/server/src/modules/event/eventService.js:594:5)
at async file:///D:/Coding/orienteerfeed/ofeed/apps/server/src/modules/event/secureEventRoutes.js:2121:29 {
code: 'P2003',
meta: { modelName: 'Class', constraint: [ 'classId' ] },
clientVersion: '6.19.0'
}
DatabaseError: Error deleting all event data
at deleteAllEventData (file:///D:/Coding/orienteerfeed/ofeed/apps/server/src/modules/event/eventService.js:604:11)
at async file:///D:/Coding/orienteerfeed/ofeed/apps/server/src/modules/event/secureEventRoutes.js:2121:29 {
statusCode: 500
}
DELETE /rest/v1/events/cmj1w087q0001sl5w20edb0vm/delete-data 500 67 - 33.482 ms
Metadata
Metadata
Assignees
Labels
backendbugSomething isn't workingSomething isn't workingpriority: lowTasks that are nice to have or lower impact. These can be addressed as time allowsTasks that are nice to have or lower impact. These can be addressed as time allows