From d94e691b07f937e4cd3754302c89832fce02e302 Mon Sep 17 00:00:00 2001 From: Christopher Suh Date: Mon, 2 Nov 2020 09:44:30 -0500 Subject: [PATCH] Fix logic for result (#1113) * commented subscription caching * added additional code path if user.UniqueId not set * fixed failing unit tests * updated logic --- .../AzureAuthenticationManager.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Microsoft.SqlTools.ResourceProvider.DefaultImpl/AzureAuthenticationManager.cs b/src/Microsoft.SqlTools.ResourceProvider.DefaultImpl/AzureAuthenticationManager.cs index 4a8b9a08..1509fcfd 100644 --- a/src/Microsoft.SqlTools.ResourceProvider.DefaultImpl/AzureAuthenticationManager.cs +++ b/src/Microsoft.SqlTools.ResourceProvider.DefaultImpl/AzureAuthenticationManager.cs @@ -225,7 +225,7 @@ namespace Microsoft.SqlTools.ResourceProvider.DefaultImpl if (user.UniqueId != "") { result = _subscriptionCache.Get(user.UniqueId); } - if (result == null) { + if (result == Enumerable.Empty() ^ result == null) { result = await GetSubscriptionFromServiceAsync(user); _subscriptionCache.UpdateCache(user.UniqueId, result); }