Skip to content

Commit

Permalink
Fixed typo and slightly improved error message when db is missing tim…
Browse files Browse the repository at this point in the history
…e zone definitions.

Refs #21432.
  • Loading branch information
loic committed Nov 15, 2013
1 parent 8e6d1b9 commit 32e7580
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions django/db/models/sql/compiler.py
Expand Up @@ -1083,8 +1083,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 32e7580

Please sign in to comment.