Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed typo and slightly improved error message when db is missing tim…

…e zone definitions.

Refs #21432.
  • Loading branch information...
commit 32e75803be8b3e9c35e6735c265125c4130ffabc 1 parent 8e6d1b9
@loic loic authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 django/db/models/sql/compiler.py
View
4 django/db/models/sql/compiler.py
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.