I was trying the following code to indicate via webscript an user has uploaded his avatar or not: <#if node.assocs["cm:avatar"]?is_collection && node.assocs["cm:avatar"]?size > 0>"avatar": "y",<#else>"avatar": "n",</#if> node is of type cmerson, the above association gives an error: freemarker.core.InvalidReferenceException: Expression node.assocs["cm:avatar"] is undefined on line 25, column 14 in tdc/node.inc.ftl at freemarker.core.TemplateObject.assertNonNull(TemplateObject.java:124)
According the contentmodel the 'avatar' association is correct, how to solve this issue?