Skip to content

Commit

Permalink
Change type of "Status" field back to string per static anaysis compl…
Browse files Browse the repository at this point in the history
…aints
  • Loading branch information
Simon Redman committed Dec 16, 2020
1 parent 58f7eef commit 3610fd2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public string RequestType
/// their automation.
/// Compare to <see cref="Azure.Management.Sql.LegacySdk.ImportExportOperations.GetImportExportOperationStatusAsync"/>
/// </summary>
public OperationStatus? Status
public string Status
{
get;
set;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,13 +143,15 @@ public AzureSqlDatabaseImportExportStatusModel GetStatus(string operationStatusL
HttpResponseMessage rawHttpResponse;
ImportExportOperationResult response = Communicator.GetOperationStatus(operationStatusLink, out rawHttpResponse);

OperationStatus? operationStatus = GetOperationStatusFromHttpStatus(rawHttpResponse.StatusCode);

AzureSqlDatabaseImportExportStatusModel status = new AzureSqlDatabaseImportExportStatusModel()
{
ErrorMessage = response.ErrorMessage,
LastModifiedTime = response.LastModifiedTime,
QueuedTime = response.QueuedTime,
StatusMessage = response.Status, // in spite of the name, the field called "Status" is the correct one to put into the "StatusMessage" field
Status = GetOperationStatusFromHttpStatus(rawHttpResponse.StatusCode),
Status = operationStatus.HasValue ? operationStatus.Value.ToString() : "",
RequestType = response.RequestType,
PrivateEndpointRequestStatus = response.PrivateEndpointConnections?.Select(pec => new PrivateEndpointRequestStatus()
{
Expand Down

0 comments on commit 3610fd2

Please sign in to comment.