From 3dee9d4d33087024724aaffb0a92bc8002a6d94e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=BCdiger=20Schmitz?= Date: Thu, 12 Dec 2024 10:07:35 +0100 Subject: [PATCH] fix: regression for HasXYZ methods --- templates/go/model_simple.mustache | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/go/model_simple.mustache b/templates/go/model_simple.mustache index 97cfca3..99b1b6c 100644 --- a/templates/go/model_simple.mustache +++ b/templates/go/model_simple.mustache @@ -245,7 +245,7 @@ func (o *{{classname}}) Get{{name}}Ok() (*{{#isNumber}}float64{{/isNumber}}{{#is // Has{{name}} returns a boolean if a field has been set. func (o *{{classname}}) Has{{name}}() bool { - if o != nil && !IsNil(o.{{name}}) && !IsNil(o.{{name}}) {{#isNullable}}{{^vendorExtensions.x-golang-is-container}}&& o.{{name}}.IsSet(){{/vendorExtensions.x-golang-is-container}}{{/isNullable}} { + if o != nil && !IsNil(o.{{name}}){{#isNullable}}{{^vendorExtensions.x-golang-is-container}} && o.{{name}}.IsSet(){{/vendorExtensions.x-golang-is-container}}{{/isNullable}} { return true }