Browse Source

Merge pull request #11753 from abpframework/enisn/rel-5.1/cms-kit-multiple-reaction-fix

Exception on multiple same reactions fix
pull/11765/head
maliming 5 years ago
committed by GitHub
parent
commit
5c503780ee
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/Reactions/ReactionPublicAppService.cs

6
modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/Reactions/ReactionPublicAppService.cs

@ -1,6 +1,8 @@
using Microsoft.AspNetCore.Authorization;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Dynamic.Core;
using System.Security.Cryptography.X509Certificates;
using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;
using Volo.Abp.GlobalFeatures;
@ -39,7 +41,9 @@ public class ReactionPublicAppService : CmsKitPublicAppServiceBase, IReactionPub
CurrentUser.GetId(),
entityType,
entityId
)).ToDictionary(x => x.ReactionName, x => x)
))
.GroupBy(x => x.ReactionName)
.ToDictionary(x => x.Key, x => x.First())
: null;
var reactionWithSelectionDtos = new List<ReactionWithSelectionDto>();

Loading…
Cancel
Save