Skip to content

Commit

Permalink
[api] allow deletion of files marked with error
Browse files Browse the repository at this point in the history
  • Loading branch information
MalinAhlberg committed Nov 21, 2024
1 parent b4d3e0c commit 6007d9f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sda/internal/database/db_functions.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ func (dbs *SDAdb) getInboxFilePathFromID(submissionUser, fileID string) (string,
"submission_user= $1 and id = $2 " +
"AND EXISTS (SELECT 1 FROM " +
"(SELECT event from sda.file_event_log where file_id = $2 order by started_at desc limit 1) " +
"as subquery WHERE event in ('registered', 'uploaded', 'submitted', 'ingested'))"
"as subquery WHERE event in ('registered', 'uploaded', 'submitted', 'ingested', 'error'))"

var filePath string
err := db.QueryRow(getFilePath, submissionUser, fileID).Scan(&filePath)
Expand Down

0 comments on commit 6007d9f

Please sign in to comment.