﻿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
23572	Exception on Custom Lookups when right value is None.	maherma-adg		"For my current project I need generate a complex queryset filter and I decide implement as custom lookup.

I got the [https://docs.djangoproject.com/en/1.7/howto/custom-lookups/, example] as base to create custom lookup, but during test, this expression:

`data = Rsce.filter(duration__ne = None)`

throws an exception. Any other expression runs smoothly.

Looking into code exception are thrown in this piece of code:
{{{
        if value is None:
            if lookups[-1] not in ('exact', 'iexact'):
                raise ValueError(""Cannot use None as a query value"")
}}}
IMHO the check in lookups must be avoided on custom lookups, allowing them to manage None values by themselves."	Bug	closed	Database layer (models, ORM)	1.7	Normal	fixed	custom lookup, db		Accepted	0	0	0	0	0	0
