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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
5 additions and
1 deletions
-
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>(); |
|
|
|
|