Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed #3377 -- Fixed subtle infinite recursion bug in LazyDate object…

…s. Thanks

to brut.alll@gmail.com.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@4497 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit ba9649f966e7bf9c1f0cea7fac2bb991beb600b5 1 parent a4ddecd
@malcolmt malcolmt authored
Showing with 6 additions and 0 deletions.
  1. +1 −0  AUTHORS
  2. +5 −0 django/db/models/__init__.py
View
1  AUTHORS
@@ -57,6 +57,7 @@ answer newbie questions, and generally made Django that much better:
Paul Bissex <http://e-scribe.com/>
Simon Blanchard
Andrew Brehaut <http://brehaut.net/blog>
+ brut.alll@gmail.com
Jonathan Buchanan <jonathan.buchanan@gmail.com>
Antonio Cavedoni <http://cavedoni.com/>
C8E
View
5 django/db/models/__init__.py
@@ -50,4 +50,9 @@ def __get_value__(self):
return (datetime.datetime.now() + self.delta).date()
def __getattr__(self, attr):
+ if attr == 'delta':
+ # To fix ticket #3377. Note that normal access to LazyDate.delta
+ # (after construction) will still work, because they don't go
+ # through __getattr__). This is mainly needed for unpickling.
+ raise AttributeError
return getattr(self.__get_value__(), attr)

0 comments on commit ba9649f

Please sign in to comment.
Something went wrong with that request. Please try again.