EDMI: Fix DoctypeId Parameter

This commit is contained in:
Jonathan Jenne
2022-03-29 13:35:20 +02:00
parent 665a23d8a7
commit 615666f040
17 changed files with 178 additions and 187 deletions

View File

@@ -18,12 +18,12 @@ Namespace Methods.IDB.NewFile
Transaction = Connection.BeginTransaction()
End Sub
Public Function Run(pData As NewFile.NewFileRequest) As NewFile.NewFileResponse
Public Function Run(pData As NewFileRequest) As NewFileResponse
Dim oFilePath As String = Nothing
Dim oExistingObjectId = Helpers.TestFileChecksumExists(pData.File.FileChecksum)
If oExistingObjectId > 0 Then
Return New NewFile.NewFileResponse(oExistingObjectId)
Return New NewFileResponse(oExistingObjectId)
End If
Try
@@ -134,7 +134,8 @@ Namespace Methods.IDB.NewFile
' Finally, commit the transaction
Transaction?.Commit()
Return New NewFile.NewFileResponse(oObjectId)
Return New NewFileResponse(oObjectId)
Catch ex As Exception
Logger.Warn("Error occurred while creating file!")
Logger.Error(ex)
@@ -152,7 +153,7 @@ Namespace Methods.IDB.NewFile
Logger.Info("Rolling back transaction.")
Transaction?.Rollback()
Return New NewFile.NewFileResponse(ex)
Return New NewFileResponse(ex)
End Try
End Function