File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -900,16 +900,21 @@ def validation_helper(
900900 detail = "File type is not valid and/or not accepted by this institution: "
901901 + str (e ),
902902 ) from e
903- new_file_record = FileTable (
904- name = file_name ,
905- inst_id = str_to_uuid (inst_id ),
906- uploader = str_to_uuid (current_user .user_id ),
907- source = source_str ,
908- sst_generated = False ,
909- schemas = list (inferred_schemas ),
910- valid = True ,
911- )
912- local_session .get ().add (new_file_record )
903+
904+ try :
905+ new_file_record = FileTable (
906+ name = file_name ,
907+ inst_id = str_to_uuid (inst_id ),
908+ uploader = str_to_uuid (current_user .user_id ),
909+ source = source_str ,
910+ sst_generated = False ,
911+ schemas = list (inferred_schemas ),
912+ valid = True ,
913+ )
914+ local_session .get ().add (new_file_record )
915+ except Exception as e :
916+ logging .error (f"Error message: { str (e )} " )
917+
913918 return {
914919 "name" : file_name ,
915920 "inst_id" : inst_id ,
You can’t perform that action at this time.
0 commit comments