You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi.
I'm trying to use the package but I have a lot of fields in python mapped to fields named differently in Dynamo (using the attr_name).
Each of those fields results in a None value when serializing it, and in addition it uses the attr_name instead of the field name.
Example:
class Result(Model):
app_id = NumberAttribute(attr_name="appId")
domain = UnicodeAttribute()
class ResultSchema(ModelSchema):
class Meta:
model = Result
result = Result(app_id=5, domain='a.com')
ResultSchema().dump(result).data
>>> {'domain': 'a.com', 'appId': None}
Expected: {'domain': 'a.com', 'app_id': 5}
Changing the model's attributes to the original attribute names is not an option as part of them have symbols that are not supported by python as valid names (appId#version for example)
Thanks
The text was updated successfully, but these errors were encountered:
Hi.
I'm trying to use the package but I have a lot of fields in python mapped to fields named differently in Dynamo (using the attr_name).
Each of those fields results in a None value when serializing it, and in addition it uses the
attr_name
instead of the field name.Example:
Expected:
{'domain': 'a.com', 'app_id': 5}
Changing the model's attributes to the original attribute names is not an option as part of them have symbols that are not supported by python as valid names (
appId#version
for example)Thanks
The text was updated successfully, but these errors were encountered: