Skip to content

Edge case: batch insert fails leaving orphaned file import #13

Description

@jcorry

Handle the case where the file was accepted on upload and its hash saved
to the imports table but the batch insert of hosts fails, rolls back and leaves the hash in the imports table. This case would prevent the user from ever successfully uploading that file.

The simple fix is to write a file import delete method and call it with the file hash if the hosts batch insert fails.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workinggood first issueGood for newcomers

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions