﻿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
37047	Crash in Query.orderby_issubset_groupby for descending and random order_by strings	Anže Pečar		"#26434 caused a crash. It can be reproduced with:

{{{
User.objects.values(""is_staff"").annotate(latest=Max(""date_joined"")).order_by(""-latest"").count()
}}}

You should see the following exception:

{{{
django.core.exceptions.FieldError: Cannot resolve keyword '-latest' into field. Choices are: activity_logs, date_joined, email, first_name, groups, id, is_active, is_administrator, is_staff, is_superuser, last_login, last_name, latest, logentry, module_access, password, user_permissions, username
}}}"	Bug	new	Database layer (models, ORM)	dev	Normal				Unreviewed	1	0	0	0	0	0
