Skip to content

Commit

Permalink
[1.6.x] Fixed typo and slightly improved error message when db is mis…
Browse files Browse the repository at this point in the history
…sing time zone definitions.

Refs #21432.

Backport of 32e7580 from master
  • Loading branch information
loic authored and timgraham committed Dec 26, 2013
1 parent 0e81383 commit 3bb7de8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions django/db/models/sql/compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -1105,8 +1105,8 @@ def results_iter(self):
if settings.USE_TZ:
if datetime is None:
raise ValueError("Database returned an invalid value "
"in QuerySet.dates(). Are time zone "
"definitions and pytz installed?")
"in QuerySet.datetimes(). Are time zone "
"definitions for your database and pytz installed?")
datetime = datetime.replace(tzinfo=None)
datetime = timezone.make_aware(datetime, self.query.tzinfo)
yield datetime
Expand Down

0 comments on commit 3bb7de8

Please sign in to comment.