1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-03 17:12:49 -05:00

Use the correct policy enum type (#2045)

Explicit conversion from non-generics to generics doesn't seem to work
here, so I moved to using the read methods already on base Policy.
This commit is contained in:
Matt Gibson
2022-06-09 18:57:56 -05:00
committed by GitHub
parent 65ac9a527f
commit 9ff82ab176
8 changed files with 8 additions and 31 deletions

View File

@ -19,8 +19,6 @@ namespace Bit.Infrastructure.EntityFramework.Repositories
: base(serviceScopeFactory, mapper, (DatabaseContext context) => context.Policies)
{ }
public async Task<Core.Entities.Policy<T>> GetByOrganizationIdTypeAsync<T>(Guid organizationId, PolicyType type) where T : IPolicyDataModel, new() =>
(Core.Entities.Policy<T>)await GetByOrganizationIdTypeAsync(organizationId, type);
public async Task<Core.Entities.Policy> GetByOrganizationIdTypeAsync(Guid organizationId, PolicyType type)
{
using (var scope = ServiceScopeFactory.CreateScope())