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