diff --git a/docs/ref/models/querysets.txt b/docs/ref/models/querysets.txt index 7f55684e0827a..f575ab7fb790d 100644 --- a/docs/ref/models/querysets.txt +++ b/docs/ref/models/querysets.txt @@ -644,7 +644,7 @@ A few subtleties that are worth mentioning: ignored. * Calling :meth:`only()` and :meth:`defer()` after ``values()`` doesn't make - sense, so doing so will raise a ``NotImplementedError``. + sense, so doing so will raise a ``TypeError``. * Combining transforms and aggregates requires the use of two :meth:`annotate` calls, either explicitly or as keyword arguments to :meth:`values`. As above, @@ -3491,8 +3491,7 @@ documentation to learn how to create your aggregates. SQLite can't handle aggregation on date/time fields out of the box. This is because there are no native date/time fields in SQLite and Django currently emulates these features using a text field. Attempts to use - aggregation on date/time fields in SQLite will raise - ``NotImplementedError``. + aggregation on date/time fields in SQLite will raise ``NotSupportedError``. .. admonition:: Note diff --git a/tests/backends/sqlite/tests.py b/tests/backends/sqlite/tests.py index c0145199100c2..17a58f32aedf0 100644 --- a/tests/backends/sqlite/tests.py +++ b/tests/backends/sqlite/tests.py @@ -37,9 +37,7 @@ def test_check_sqlite_version(self): check_sqlite_version() def test_aggregation(self): - """ - Raise NotImplementedError when aggregating on date/time fields (#19360). - """ + """Raise NotSupportedError when aggregating on date/time fields.""" for aggregate in (Sum, Avg, Variance, StdDev): with self.assertRaises(NotSupportedError): Item.objects.all().aggregate(aggregate('time'))