﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
34486	SearchHeadline crashes without an active connection.	Scott Macpherson	Scott Macpherson	"Following an upgrade to Django 4.2 and psycopg3, any use of SearchVector has started returning AttributeError ""'NoneType' object has no attribute 'pgconn'"".

It seems to be because the instance of DatabaseWrapper passed in to as_sql doesn't have a connection: DatabaseOperations.compose_sql calls mogrify, which in turn calls .connection on the DatabaseWrapper, which returns NoneType.

I've verified that calling connection.connect() in search.py immediately before the compose_sql line resolves this, but I don't know nearly enough to know if this is the real root problem, or where in the stack the connection is supposed to be created if it is."	Bug	closed	contrib.postgres	4.2	Release blocker	fixed		Florian Apolloner Daniele Varrazzo	Ready for checkin	1	0	0	0	0	0
