﻿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
6704	.exclude(foreignkey_field__isnull=True) doesn't quite work on qs-rf	matt@…	nobody	"It gets turned into: (NOT table.foreignkey_field_id IS NULL OR table.foreignkey_field_id IS NULL) which of course is always going to be true :)

Haven't got my head around the code yet, but I'm guessing the following line is being run in this situation when it shouldn't be (I presume the line is intended for when a join is being done to get the required attribute on the related object, but for the special case of the id/pk field no join is needed and in fact no join was added):
{{{
self.where.add([alias, col, field, 'isnull', True], OR)
}}}

"		closed	Uncategorized	queryset-refactor		fixed	qs-rf		Accepted	0	0	0	0	0	0
