﻿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
28012	JsonField PostgreSQL problem	Martín Peveri		"Hi, I have a model with a field JsonField of PostgreSQL of name 'data', like this:

{{{
class ItemCampaign(models.Model):

   campaign = models.ForeignKey(
       Campaign, related_name=""itemscampaign"", verbose_name=""Item campaña""
   )
   data = JSONField(default=dict)

   def __str__(self):
       return self.campaign.name
}}}


In this field i have one record with this data, for example:

{{{
[{'number': '1160188479', 'id': 0, 'content': 'hello', 'processed': True}, {'number': '1160188479', 'id': 1, 'content': 'hello', 'processed': False}, {'number': '1160188479', 'id': 2, 'content': 'hello', 'processed': False}, {'number': '1162341721', 'id': 3, 'content': 'hello', 'processed': False}, {'number': '1162341721', 'id': 4, 'content': 'hello', 'processed': False}, {'number': '1162341721', 'id': 5, 'content': 'hello', 'processed': False}]
}}}

If i want filtered, like this:

{{{
itemscampaign.filter(data__contains=[{'processed': True}])
}}}

This code returned all content data field, Instead of just the dict with 'processed' in True. I want know if this is an error or not is possible.

Thanks!"	Uncategorized	closed	contrib.postgres	1.10	Normal	invalid			Unreviewed	0	0	0	0	0	0
