From fe7ccd98a933e1a04ecd48895df680439ba4ec27 Mon Sep 17 00:00:00 2001 From: Miki Rozloznik Date: Mon, 25 Nov 2024 16:49:57 +0100 Subject: [PATCH] Fix validate --- extension/freemarker/Structure.cpp.ftl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extension/freemarker/Structure.cpp.ftl b/extension/freemarker/Structure.cpp.ftl index 7d1eb20..f2a608e 100644 --- a/extension/freemarker/Structure.cpp.ftl +++ b/extension/freemarker/Structure.cpp.ftl @@ -272,7 +272,7 @@ void validate(const View<${fullName}>&<#if fieldList?has_content || parameterLis <#if field.optional??> <#if field.optional.viewIndirectClause??> // check non-auto optional - if (${field.optional.viewIndirectClause} && !view.${field.getterName}()) + if ((${field.optional.viewIndirectClause}) && !view.${field.getterName}()) { throw MissedOptionalException("Optional field '${name}.${field.name}' is used but not set!"); }