Skip to content

Commit

Permalink
fix: don't generate a displayProp metadata for datasources
Browse files Browse the repository at this point in the history
  • Loading branch information
ascott18 committed May 22, 2024
1 parent 429ba86 commit 9a07964
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/IntelliTect.Coalesce/TypeDefinition/ClassViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,7 @@ public IEnumerable<SearchableProperty> SearchProperties(ClassViewModel? rootMode
/// Use the ListText Attribute first, then Name and then ID.
/// </summary>
public PropertyViewModel? ListTextProperty =>
Type.IsA(typeof(IDataSource<>)) ? null :
ClientProperties.FirstOrDefault(f => f.IsListText) ??
ClientProperties.FirstOrDefault(f => f.Name == "Name") ??
PrimaryKey;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,7 @@ public override bool IsRequired
{
// Init-only properties on entity types are inherently required
// because they can't be set after the initial save.
// TODO: https://github.com/IntelliTect/Coalesce/issues/386
return true;
}

Expand Down

0 comments on commit 9a07964

Please sign in to comment.