Skip to content

Commit

Permalink
Fixed Timestamped hooks to work with new hook api
Browse files Browse the repository at this point in the history
  • Loading branch information
leahfitch committed Oct 8, 2014
1 parent c0e86b4 commit 4c51724
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cellardoor/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -624,13 +624,13 @@ def setup(self):
self.hooks.pre('update', self.on_modify)


def on_create(self, fields):
def on_create(self, fields, *args, **kwargs):
now = datetime.utcnow()
fields['created'] = now
fields['modified'] = now


def on_modify(self, id, fields, replace=False):
def on_modify(self, id, fields, *args, **kwargs):
fields['modified'] = datetime.utcnow()


Expand Down

0 comments on commit 4c51724

Please sign in to comment.