data_key in Field does not work as load_from in version 2.x
jmontanag opened this issue · 2 comments
jmontanag commented
load_from
works as if value from load_from
exists it takes it, otherwise it uses field name. Unfortunately data_key
does not work at same. If data_key
is not in data it does not use field name, it just does not take it.
lafrech commented
This is intended.
Also, when data_key is specified on a field, only data_key is checked in the input data. In marshmallow 2.x the field name is checked if load_from is missing from the input data.