Skip to content

Commit 4caf17c

Browse files
authored
Update data.py
1 parent 5d45696 commit 4caf17c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/webapp/routers/data.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -850,7 +850,6 @@ def download_url_inst_file(
850850
FileTable.name == file_name,
851851
FileTable.inst_id == str_to_uuid(inst_id),
852852
FileTable.sst_generated,
853-
not FileTable.deleted,
854853
)
855854
)
856855
)
@@ -868,6 +867,11 @@ def download_url_inst_file(
868867
status_code=status.HTTP_500_INTERNAL_SERVER_ERROR,
869868
detail="File duplicates found.",
870869
)
870+
if query_result[0][0].deleted:
871+
raise HTTPException(
872+
status_code=status.HTTP_404_NOT_FOUND,
873+
detail="File has been deleted.",
874+
)
871875
return storage_control.generate_download_signed_url(
872876
get_external_bucket_name(inst_id), file_name
873877
)

0 commit comments

Comments
 (0)