Skip to content

Commit a9f8057

Browse files
Fix
1 parent 92e5428 commit a9f8057

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/Sql/Sql/Auditing/Services/SqlAuditAdapter.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,13 @@ private void ModelizeStorageInfo(ServerAuditModel model,
134134

135135
if (isAuditEnabled)
136136
{
137+
if (storageAccountSubscriptionId == null || Guid.Empty.Equals(storageAccountSubscriptionId))
138+
{
139+
storageAccountSubscriptionId = Subscription.GetId();
140+
}
141+
137142
model.StorageAccountResourceId = AzureCommunicator.RetrieveStorageAccountIdAsync(
138-
storageAccountSubscriptionId ?? Subscription.GetId(),
143+
(Guid)storageAccountSubscriptionId,
139144
GetStorageAccountName(storageEndpoint)).GetAwaiter().GetResult();
140145
ModelizeRetentionInfo(model, retentionDays);
141146
}

0 commit comments

Comments
 (0)