Skip to content

Commit

Permalink
Changes needed to use with jsonmodels 2.1.5
Browse files Browse the repository at this point in the history
  • Loading branch information
abnerjacobsen committed Mar 27, 2017
1 parent 3b3b24c commit 64302f7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion requirements/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
tinydb>=3.2.0
tinydb-serialization>=1.0.3
tinydb-smartcache>=1.0.2
jsonmodels>=2.1.2
jsonmodels>=2.1.5
3 changes: 2 additions & 1 deletion tests/2.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,10 @@ class ConfigModel(TinyJsonModel):
created_at = fields.DateTimeField(required=True)

def __init__(self, *args, **kwargs):
super(ConfigModel, self).__init__(*args, **kwargs)
self.last_update = datetime.utcnow()
self.created_at = self.last_update
super(ConfigModel, self).__init__(*args, **kwargs)
#super(ConfigModel, self).__init__(*args, **kwargs)

# this attribute wont be saved because it's not a field
address = "this attribute will not be saved"
Expand Down

0 comments on commit 64302f7

Please sign in to comment.