Add handling of user.UniqueId if not set (#1109)

* commented subscription caching

* added additional code path if user.UniqueId not set

* fixed failing unit tests
This commit is contained in:
Christopher Suh
2020-10-30 13:25:07 -04:00
committed by GitHub
parent b3bd1f8f99
commit 71a98eacf4

View File

@@ -222,9 +222,10 @@ namespace Microsoft.SqlTools.ResourceProvider.DefaultImpl
if (user != null)
{
result = _subscriptionCache.Get(user.UniqueId);
if (result == null)
{
if (user.UniqueId != "") {
result = _subscriptionCache.Get(user.UniqueId);
}
if (result == null) {
result = await GetSubscriptionFromServiceAsync(user);
_subscriptionCache.UpdateCache(user.UniqueId, result);
}