Fix null dereference
This commit is contained in:
parent
d79f816cc1
commit
c02a2f0c20
1 changed files with 3 additions and 1 deletions
|
@ -195,7 +195,9 @@ func (o *{{$txt.LocalTable.NameGo}}) Set{{$txt.Function.Name}}(exec boil.Executo
|
|||
|
||||
{{if .ToJoinTable -}}
|
||||
remove{{$txt.Function.Name}}From{{$txt.Function.ForeignName}}Slice(o, related)
|
||||
o.R.{{$txt.Function.Name}} = nil
|
||||
if o.R != nil {
|
||||
o.R.{{$txt.Function.Name}} = nil
|
||||
}
|
||||
{{else -}}
|
||||
if o.R != nil {
|
||||
for _, rel := range o.R.{{$txt.Function.Name}} {
|
||||
|
|
Loading…
Add table
Reference in a new issue