diff --git a/AUTHORS b/AUTHORS index 61cdfad074..879110e776 100644 --- a/AUTHORS +++ b/AUTHORS @@ -57,6 +57,7 @@ answer newbie questions, and generally made Django that much better: Paul Bissex Simon Blanchard Andrew Brehaut + brut.alll@gmail.com Jonathan Buchanan Antonio Cavedoni C8E diff --git a/django/db/models/__init__.py b/django/db/models/__init__.py index 0308dd047a..47057e306f 100644 --- a/django/db/models/__init__.py +++ b/django/db/models/__init__.py @@ -50,4 +50,9 @@ class LazyDate(object): 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)