Skip to content

Commit

Permalink
Merge 0ab9a82 into 7ec9114
Browse files Browse the repository at this point in the history
  • Loading branch information
veeloox committed Jun 8, 2015
2 parents 7ec9114 + 0ab9a82 commit cb02623
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions motorengine/fields/datetime_field.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ def get_value(self, value):
if self.auto_now_on_insert and value is None:
return datetime.now()

if self.auto_now_on_update:
return datetime.now()

return value

def to_son(self, value):
if self.auto_now_on_update:
return datetime.now()

if isinstance(value, six.string_types):
return datetime.strptime(value, FORMAT)

Expand Down

0 comments on commit cb02623

Please sign in to comment.