Skip to content

Commit

Permalink
Fixed #2513 -- Changed LazyDate.__get_value__() to return date object…
Browse files Browse the repository at this point in the history
…s, not datetime objects

git-svn-id: http://code.djangoproject.com/svn/django/trunk@3566 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information
adrianholovaty committed Aug 12, 2006
1 parent 9cd0c33 commit 54ea309
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion django/db/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def __repr__(self):
return "<LazyDate: %s>" % self.delta

def __get_value__(self):
return datetime.datetime.now() + self.delta
return (datetime.datetime.now() + self.delta).date()

def __getattr__(self, attr):
return getattr(self.__get_value__(), attr)

0 comments on commit 54ea309

Please sign in to comment.