diff --git a/tpl/macros_struct.twig b/tpl/macros_struct.twig index d68a15a..d30dd35 100644 --- a/tpl/macros_struct.twig +++ b/tpl/macros_struct.twig @@ -305,7 +305,9 @@ func Save{{ ctx.s.name }}CollectionDiff(ctx context.Context, dbe metadb.Execer, queryBuilder.WriteString(builder.update.String()) _, saveErr := dbe.ExecContext(ctx, queryBuilder.String(), builder.rawValues...) - return errors.Wrap(saveErr, queryBuilder.String()) + if saveErr != nil { + return errors.Wrap(saveErr, queryBuilder.String()) + } } return nil