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 }