fix writing fields

This commit is contained in:
Pavel Merzlyakov 2023-12-18 15:05:03 +03:00
parent 3e942c2e7d
commit 7d810fc71c
1 changed files with 1 additions and 1 deletions

View File

@ -798,7 +798,7 @@ func (s *{{ name|default(o.name) }}) FieldsCount() int {
return err
}
{% else %}
if err := writer.BeginContainer({{ get_all_fields(type)|length }}, "{{ alias }}"); err != nil {
if err := writer.BeginContainer({{ fname }}.FieldsCount(), "{{ alias }}"); err != nil {
return err
}
if err := {{ fname }}.WriteFields(writer); err != nil {