{"title":"Django 4.2.2 release notes","version":"dev","locale":"en","docname":"releases/4.2.2","url":"/en/dev/releases/4.2.2/","canonical":"https://djangodocs.dev/en/dev/releases/4.2.2/","summary":"Django 4.2.2 fixes several bugs in 4.2.1. Fixed a regression in Django 4.2 that caused an unnecessary DBMS_LOB.SUBSTR() wrapping in the __isnull and…","html":"<h1>Django 4.2.2 release notes<a class=\"heading-anchor\" href=\"#django-4-2-2-release-notes\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h1>\n<p><em>June 5, 2023</em></p>\n<p>Django 4.2.2 fixes several bugs in 4.2.1.</p>\n<section id=\"bugfixes\">\n<h2>Bugfixes<a class=\"heading-anchor\" href=\"#bugfixes\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<ul class=\"simple\">\n<li><p>Fixed a regression in Django 4.2 that caused an unnecessary\n<code class=\"docutils literal notranslate\">DBMS_LOB.SUBSTR()</code> wrapping in the <code class=\"docutils literal notranslate\">__isnull</code> and <code class=\"docutils literal notranslate\">__exact=None</code>\nlookups for <code class=\"docutils literal notranslate\">TextField()</code>/<code class=\"docutils literal notranslate\">BinaryField()</code> on Oracle (<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/34544\">#34544</a>).</p></li>\n<li><p>Restored, following a regression in Django 4.2, <code class=\"docutils literal notranslate\">get_prep_value()</code> call in\n<code class=\"docutils literal notranslate\">JSONField</code> subclasses (<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/34539\">#34539</a>).</p></li>\n<li><p>Fixed a regression in Django 4.2 that caused a crash of <code class=\"docutils literal notranslate\">QuerySet.defer()</code>\nwhen passing a <code class=\"docutils literal notranslate\">ManyToManyField</code> or <code class=\"docutils literal notranslate\">GenericForeignKey</code> reference. While\ndoing so is a no-op, it was allowed in older version (<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/34570\">#34570</a>).</p></li>\n<li><p>Fixed a regression in Django 4.2 that caused a crash of <code class=\"docutils literal notranslate\">QuerySet.only()</code>\nwhen passing a reverse <code class=\"docutils literal notranslate\">OneToOneField</code> reference (<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/34612\">#34612</a>).</p></li>\n<li><p>Fixed a bug in Django 4.2 where <a class=\"reference internal\" href=\"/en/dev/ref/django-admin/#cmdoption-makemigrations-update\"><code class=\"xref std std-option docutils literal notranslate\">makemigrations --update</code></a> didn’t\nrespect the <code class=\"docutils literal notranslate\">--name</code> option (<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/34568\">#34568</a>).</p></li>\n<li><p>Fixed a performance regression in Django 4.2 when compiling queries without\nordering (<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/34580\">#34580</a>).</p></li>\n<li><p>Fixed a regression in Django 4.2 where nonexistent stylesheet was linked on a\n“Congratulations!” page (<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/34588\">#34588</a>).</p></li>\n<li><p>Fixed a regression in Django 4.2 that caused a crash of\n<code class=\"docutils literal notranslate\">QuerySet.aggregate()</code> with expressions referencing other aggregates\n(<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/34551\">#34551</a>).</p></li>\n<li><p>Fixed a regression in Django 4.2 that caused a crash of\n<code class=\"docutils literal notranslate\">QuerySet.aggregate()</code> with aggregates referencing subqueries\n(<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/34551\">#34551</a>).</p></li>\n<li><p>Fixed a regression in Django 4.2 that caused a crash of querysets on SQLite\nwhen filtering on <code class=\"docutils literal notranslate\">DecimalField</code> against values outside of the defined\nrange (<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/34590\">#34590</a>).</p></li>\n<li><p>Fixed a regression in Django 4.2 that caused a serialization crash on a\n<code class=\"docutils literal notranslate\">ManyToManyField</code> without a natural key when its <code class=\"docutils literal notranslate\">Manager</code>’s base\n<code class=\"docutils literal notranslate\">QuerySet</code> used <code class=\"docutils literal notranslate\">select_related()</code> (<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/34620\">#34620</a>).</p></li>\n</ul>\n</section>","rootId":"django-4-2-2-release-notes","toc":[{"title":"Bugfixes","anchor":"bugfixes","children":[]}],"breadcrumbs":[{"docname":"releases/index","title":"Release notes","url":"/en/dev/releases/"}],"prev":{"docname":"releases/4.2.3","title":"Django 4.2.3 release notes","url":"/en/dev/releases/4.2.3/"},"next":{"docname":"releases/4.2.1","title":"Django 4.2.1 release notes","url":"/en/dev/releases/4.2.1/"},"formats":{"html":"/en/dev/releases/4.2.2/","markdown":"/en/dev/releases/4.2.2.md","json":"/en/dev/releases/4.2.2.json"},"source":"https://github.com/django/django/blob/main/docs/releases/4.2.2.txt","official":"https://docs.djangoproject.com/en/dev/releases/4.2.2/","inVersions":["dev","6.1","6.0","5.2","5.1","5.0","4.2"],"inLocales":["en"]}