Skip to content

Commit e86ed77

Browse files
committed
revert alias key mapping.
1 parent 7cb1588 commit e86ed77

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/serializers/computed_fields.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -87,12 +87,8 @@ impl ComputedFields {
8787
if extra.exclude_none && value.is_none() {
8888
continue;
8989
}
90-
let key = match extra.by_alias {
91-
true => computed_field.alias.as_str(),
92-
false => computed_field.property_name.as_str(),
93-
};
9490
let field_extra = Extra {
95-
field_name: Some(key),
91+
field_name: Some(computed_field.property_name.as_str()),
9692
..*extra
9793
};
9894
let cfs = ComputedFieldSerializer {
@@ -102,6 +98,10 @@ impl ComputedFields {
10298
exclude: next_exclude.as_ref(),
10399
extra: &field_extra,
104100
};
101+
let key = match extra.by_alias {
102+
true => computed_field.alias.as_str(),
103+
false => computed_field.property_name.as_str(),
104+
};
105105
map.serialize_entry(key, &cfs)?;
106106
}
107107
}

0 commit comments

Comments
 (0)