From 63b33a20acafa124b604d717ba5f6444657c07cf Mon Sep 17 00:00:00 2001 From: "Collin M. Barrett" Date: Mon, 1 Jul 2019 15:37:57 -0500 Subject: [PATCH] filter props to validate to only those of type Uri --- .../Infrastructure/Repositories/UrlsRepository.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/FilterLists.Agent/Infrastructure/Repositories/UrlsRepository.cs b/src/FilterLists.Agent/Infrastructure/Repositories/UrlsRepository.cs index d2f591d2d..175c99b46 100644 --- a/src/FilterLists.Agent/Infrastructure/Repositories/UrlsRepository.cs +++ b/src/FilterLists.Agent/Infrastructure/Repositories/UrlsRepository.cs @@ -23,7 +23,8 @@ public async Task> GetAllAsync() var endpoint = BuildEndpoint(); var request = new RestRequest(endpoint); var response = await _apiClient.ExecuteAsync>(request); - return response.SelectMany(r => r.GetType().GetProperties().Select(p => (Uri)p.GetValue(r))) + return response.SelectMany(r => + r.GetType().GetProperties().Where(p => p.GetType() == typeof(Uri)).Select(p => (Uri)p.GetValue(r))) .Where(u => u != null); }