Umbraco 8.18.2 Model.HasValue always true for new nodes
Model.HasValue returns true for empty template items for nodes/documents created with Umbraco version 8.18.2
Nodes created with earlier versions of Umbraco 8 Model.HasValue still works correctly based on the content or lack of content.
Is there an alternative to Model.HasValue that I should be using? Or is there a way to find the new node/document in the database and clean up things there.
Umbraco 8.18.2 Model.HasValue always true for new nodes
Model.HasValue returns true for empty template items for nodes/documents created with Umbraco version 8.18.2
Nodes created with earlier versions of Umbraco 8 Model.HasValue still works correctly based on the content or lack of content.
Is there an alternative to Model.HasValue that I should be using? Or is there a way to find the new node/document in the database and clean up things there.
I found what I needed using the .Any() function as below
var links = Model.Value<>>("requiredProductLinks"); if (links.Any()) {
Related technology
}is working on a reply...