From c0a10b9de707db370fade8e63eceb448836eddb2 Mon Sep 17 00:00:00 2001
From: Petar Hristov <hristov@itc.rwth-aachen.de>
Date: Tue, 6 Dec 2022 10:46:06 +0100
Subject: [PATCH] Fix: New special case to deal with
 'https://ror.org/%20https://ror.org/'

---
 src/KPI Generator/Reportings/User/UserReporting.cs | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/src/KPI Generator/Reportings/User/UserReporting.cs b/src/KPI Generator/Reportings/User/UserReporting.cs
index 2fd0627..87c23ba 100644
--- a/src/KPI Generator/Reportings/User/UserReporting.cs	
+++ b/src/KPI Generator/Reportings/User/UserReporting.cs	
@@ -201,6 +201,19 @@ public class UserReporting : Reporting<UserReportingOptions>
             }
         }
 
+        // Special case until `https://ror.org/%20https://ror.org/` is moved to `https://ror.org/_other`
+        if (result.Any(o => o.RorUrl.Equals("https://ror.org/%20https://ror.org/")))
+        {
+            foreach (var entry in result)
+            {
+                if (entry.RorUrl.Equals("https://ror.org/%20https://ror.org/"))
+                {
+                    entry.Name = _otherOrganization.Name;
+                    entry.RorUrl = _otherOrganization.RorUrl;
+                }
+            }
+        }
+
         return result.DistinctBy(e => e.RorUrl).ToList();
     }
 
-- 
GitLab