﻿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
36018	Sites.objects.get_current() will always return the settings.SITE_ID, even when the optional request is passed	DeVon Jackson		"It looks like if you've set the SITE_ID in your settings, the conditional in get_current() will always return that site id, even if you pass the optional request.

We thought that perhaps un-setting the SITE_ID would resolve this, but these seems to counter the steps involved when enabling and configuring the sites framework: https://docs.djangoproject.com/en/5.1/ref/contrib/sites/#enabling-the-sites-framework

The simple fix seems to be switching the order of the conditional in that method, thereby always checking the optional request parameter first.

"	Bug	closed	contrib.sites	5.1	Normal	invalid			Unreviewed	0	0	0	0	1	0
