Skip to content

Commit

Permalink
fix: modified the check for dedicated capacity status
Browse files Browse the repository at this point in the history
  • Loading branch information
davidjrh committed Mar 18, 2023
1 parent 14e2cee commit b110bd3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/DotNetNuke.PowerBI/Services/EmbedService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -371,8 +371,9 @@ private async Task<bool> ValidateWorkspaceAndCapacity(PowerBIClient client, Embe
if (workspace.IsOnDedicatedCapacity.GetValueOrDefault())
{
var capacity = await GetCapacityAsync(client, workspace.CapacityId.GetValueOrDefault()).ConfigureAwait(false);
if (capacity != null
&& !(capacity.State == CapacityState.Active || capacity.State == CapacityState.UpdatingSku))
if (capacity == null
|| (capacity != null
&& !(capacity.State == CapacityState.Active || capacity.State == CapacityState.UpdatingSku)))
{
model.IsCapacityDisabled = true;
model.ErrorMessage = string.IsNullOrEmpty(Settings.DisabledCapacityMessage)
Expand Down

0 comments on commit b110bd3

Please sign in to comment.