fix interface convertion for null virtual field
This commit is contained in:
parent
17d8186616
commit
aebe6bc644
|
@ -603,10 +603,12 @@ func (s *{{ name|default(s.name) }}) ReadFields(reader meta.Reader) error {
|
|||
return err
|
||||
}
|
||||
} else {
|
||||
{{ fname }} = v.(I{{ type.name }})
|
||||
{% if has_table_token %}
|
||||
s.changedFields.SetChanged("{{ alias }}")
|
||||
{% endif %}
|
||||
if v != nil {
|
||||
{{ fname }} = v.(I{{ type.name }})
|
||||
{% if has_table_token %}
|
||||
s.changedFields.SetChanged("{{ alias }}")
|
||||
{% endif %}
|
||||
}
|
||||
}
|
||||
{% else %}
|
||||
if err := reader.BeginContainer("{{ alias }}"); err != nil {
|
||||
|
|
Loading…
Reference in New Issue