Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[1.6.x] Fixed typo and slightly improved error message when db is mis…

…sing time zone definitions.

Refs #21432.

Backport of 32e7580 from master
  • Loading branch information...
commit 3bb7de8c7c3f9d5de5426d94f45fe83b5d998357 1 parent 0e81383
@loic loic authored timgraham committed
Showing with 2 additions and 2 deletions.
  1. +2 −2 django/db/models/sql/compiler.py
View
4 django/db/models/sql/compiler.py
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.