Browse Source

Fix OpenIddictAuthorizationStore.SetApplicationIdAsync() to use the correct navigation property

pull/495/head
Kévin Chalet 9 years ago
parent
commit
8404db2bec
  1. 2
      src/OpenIddict.EntityFramework/Stores/OpenIddictAuthorizationStore.cs
  2. 2
      src/OpenIddict.EntityFrameworkCore/Stores/OpenIddictAuthorizationStore.cs

2
src/OpenIddict.EntityFramework/Stores/OpenIddictAuthorizationStore.cs

@ -332,7 +332,7 @@ namespace OpenIddict.EntityFramework
// Try to retrieve the application associated with the authorization.
// If none can be found, assume that no application is attached.
var application = await Applications.FirstOrDefaultAsync(element => element.Tokens.Any(t => t.Id.Equals(key)));
var application = await Applications.FirstOrDefaultAsync(element => element.Authorizations.Any(t => t.Id.Equals(key)));
if (application != null)
{
application.Authorizations.Remove(authorization);

2
src/OpenIddict.EntityFrameworkCore/Stores/OpenIddictAuthorizationStore.cs

@ -332,7 +332,7 @@ namespace OpenIddict.EntityFrameworkCore
// Try to retrieve the application associated with the authorization.
// If none can be found, assume that no application is attached.
var application = await Applications.FirstOrDefaultAsync(element => element.Tokens.Any(t => t.Id.Equals(key)));
var application = await Applications.FirstOrDefaultAsync(element => element.Authorizations.Any(t => t.Id.Equals(key)));
if (application != null)
{
application.Authorizations.Remove(authorization);

Loading…
Cancel
Save