mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Simplified QuerySet field.null handling
QuerySet had previously some complex logic for dealing with nullable fields in negated add_filter() calls. It seems the logic is leftover from a time where the WhereNode wasn't as intelligent in handling field__in=[] conditions. Thanks to aaugustin for comments on the patch.
This commit is contained in:
@@ -346,3 +346,9 @@ class OneToOneCategory(models.Model):
|
||||
|
||||
def __unicode__(self):
|
||||
return "one2one " + self.new_name
|
||||
|
||||
class NullableName(models.Model):
|
||||
name = models.CharField(max_length=20, null=True)
|
||||
|
||||
class Meta:
|
||||
ordering = ['id']
|
||||
|
||||
Reference in New Issue
Block a user