From 09e8b77ee315ccb631c82ef6dc8a2bca45973df1 Mon Sep 17 00:00:00 2001 From: mansour_nazifiasl_geeksltd Date: Thu, 13 Jun 2024 12:30:48 +0100 Subject: [PATCH] Distinct GetBoardSources --- Controllers/Custom/BoardComponents.cs | 10 +++++++++- Olive.Microservices.Hub.csproj | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/Controllers/Custom/BoardComponents.cs b/Controllers/Custom/BoardComponents.cs index 4b8cb64..5f11c27 100644 --- a/Controllers/Custom/BoardComponents.cs +++ b/Controllers/Custom/BoardComponents.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.Linq; using System.Threading.Tasks; using Newtonsoft.Json; using Olive; @@ -13,7 +14,14 @@ partial class BoardComponents public string GetBoardSources(string type) { if (BoardComponentSources.ContainsKey(type.ToLower())) - return BoardComponentSources[type.ToLower()].ToString(";"); + { + var items = BoardComponentSources[type.ToLower()]; + if (items != null) + { + return items.Distinct().ToString(";"); + } + } + return ""; } diff --git a/Olive.Microservices.Hub.csproj b/Olive.Microservices.Hub.csproj index 3ed91de..0719f80 100644 --- a/Olive.Microservices.Hub.csproj +++ b/Olive.Microservices.Hub.csproj @@ -8,7 +8,7 @@ Geeks Ltd https://github.com/Geeksltd/Olive.Microservices.Hub/tree/master/Olive.Microservices.Hub icon.png - 1.5.44 + 1.5.45 false false warnings