From 6e091568d2455b02e760fd78255c601fe649905d Mon Sep 17 00:00:00 2001 From: Natalia Portillo Date: Fri, 12 Sep 2025 11:30:49 +0100 Subject: [PATCH] Fix display name helper not working. --- Aaru.Server/DisplayNameHelper.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Aaru.Server/DisplayNameHelper.cs b/Aaru.Server/DisplayNameHelper.cs index 79eac68d..da6c0610 100644 --- a/Aaru.Server/DisplayNameHelper.cs +++ b/Aaru.Server/DisplayNameHelper.cs @@ -1,4 +1,4 @@ -using System.ComponentModel.DataAnnotations; +using System.ComponentModel; using System.Reflection; namespace Aaru.Server; @@ -11,10 +11,10 @@ public static class DisplayNameHelper if(prop is null) return propertyName; - DisplayAttribute? displayAttr = prop.GetCustomAttributes(typeof(DisplayAttribute), true) - .OfType() - .FirstOrDefault(); + DisplayNameAttribute? displayAttr = prop.GetCustomAttributes(typeof(DisplayNameAttribute), true) + .OfType() + .FirstOrDefault(); - return displayAttr?.Name ?? propertyName; + return displayAttr?.DisplayName ?? propertyName; } } \ No newline at end of file