generated from timoguin/repo-template
-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug: Datetime fields break DynamoDB serialization for models #17
Labels
bug
Something isn't working
Comments
timoguin
added a commit
that referenced
this issue
Jan 26, 2022
…ation This fixes a few bugs with organizations models, as well as one with ModelBase. ### Changed - Changed the `Account.joined_timestamp` field from datetime to str to fix DynamoDB (de)serialization - Changed the `Organization` model to allow fields to be null for empty init - Fixes broken login in `ModelBase.to_dict()` when passing field_name, removes unused flatten kwarg Closes #17
timoguin
added a commit
that referenced
this issue
Jan 26, 2022
…ation (#21) This fixes a few bugs with organizations models, as well as one with ModelBase. ### Changed - Changed the `Account.joined_timestamp` field from datetime to str to fix DynamoDB (de)serialization - Changed the `Organization` model to allow fields to be null for empty init - Fixes broken login in `ModelBase.to_dict()` when passing field_name, removes unused flatten kwarg Closes #17
timoguin
added a commit
that referenced
this issue
Jan 28, 2022
In attempting to fix DynamoDB serialization for the `Account` model in #17, another bug was introduced. This fixes it. ### Changed - Adds configuration to `Account.from_dict()` to cast `joined_timestamp` to a string
timoguin
added a commit
that referenced
this issue
Jan 28, 2022
In attempting to fix DynamoDB serialization for the `Account` model in #17, another bug was introduced. This fixes it. ### Changed - Adds configuration to `Account.from_dict()` to cast `joined_timestamp` to a string - Updates `ModelBase.from_dict()` to accept and pass through kwargs
timoguin
added a commit
that referenced
this issue
Jan 28, 2022
In attempting to fix DynamoDB serialization for the `Account` model in #17, another bug was introduced. This fixes it. ### Changed - Adds configuration to `Account.from_dict()` to cast `joined_timestamp` to a string - Updates `ModelBase.from_dict()` to accept and pass through kwargs
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The DynamoDB serializer implemented in
ModelBase().to_dynamodb()
fails with a TypeError if there is adatetime.datetime
field on the model instance.This is breaking the
organization.Account
model serialization. In the previous release, thejoined_timestamp
field was a string type instead ofdatetime.datetime
.Error message:
The text was updated successfully, but these errors were encountered: