From bae016692557467c7def75b099e7e2e28686f3f3 Mon Sep 17 00:00:00 2001 From: Casper Sparre Date: Thu, 19 Feb 2026 22:42:27 +0100 Subject: [PATCH] Fixed bug in GetNestedPropertyValue Caused by DTO mapper not mapping "Full" model when Url was null or empty. --- OF DL.Core/Services/FileNameService.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/OF DL.Core/Services/FileNameService.cs b/OF DL.Core/Services/FileNameService.cs index 92414e8..45108b5 100644 --- a/OF DL.Core/Services/FileNameService.cs +++ b/OF DL.Core/Services/FileNameService.cs @@ -200,9 +200,11 @@ public class FileNameService(IAuthService authService) : IFileNameService object? value = source; foreach (string propertyName in propertyPath.Split('.')) { - PropertyInfo property = value?.GetType().GetProperty(propertyName) ?? - throw new ArgumentException($"Property '{propertyName}' not found."); - value = property.GetValue(value); + PropertyInfo? property = value?.GetType().GetProperty(propertyName); + value = property?.GetValue(value); + + if (value is null) + break; } return value;