bug fixes

This commit is contained in:
Paul Schneider 2024-11-10 23:12:02 +00:00
commit 852020f98f
28 changed files with 261 additions and 234 deletions

View file

@ -0,0 +1,26 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Yavsc.Models.Access;
namespace Yavsc.ViewModels.Blog
{
public class BlogPostInputViewModel
{
[StringLength(1024)]
public string? Photo { get; set; }
[StringLength(1024)]
public required string Title { get; set; }
[StringLength(56224)]
public required string Content { get; set; }
public bool Visible { get; set; }
[InverseProperty("Target")]
[Display(Name="Liste de contrôle d'accès")]
public virtual List<CircleAuthorizationToBlogPost>? ACL { get; set; }
}
}

View file

@ -7,7 +7,8 @@ namespace Yavsc.ViewModels.Relationship
public CirclesViewModel(ICircleAuthorized resource)
{
Target = resource;
TargetTypeName = resource.GetType().Name;
if (resource!=null)
TargetTypeName = resource.GetType().Name;
}
public ICircleAuthorized Target { get; set; }
public string TargetTypeName { get; set; }