I am having a Django model like:
class Subscription(models.Model):
data = JSONField(default=dict)
I want to do something like this:
data = {"product_id": 123, "available": False}
subscription, new = Subscription.objects.get_or_create(data__product_id=123,
data__available=False)
I tried doing the above but it just set the field as empty dictionary.