Skip to content

__in type queries do not work with encrypted fields? #435

Open
@ckcollab

Description

@ckcollab

Hey there! Thanks so much for releasing this for free, so far it's been working pretty well for us.

We have

Working code + the query it generates:

BrokerageAccountSchwab.objects.filter(account_number="12345678")
SELECT * WHERE convert_from(decrypt(dearmor("schwab_brokerageaccountschwab"."account_number"), b'1t)ic$cud3mk-75c^6#_w)!xg-j=496d', 'aes'), 'utf-8') = 12345678

Not working code + query it generates

BrokerageAccountSchwab.objects.filter(account_number__in=["345643656", "4242345"])
SELECT * WHERE "schwab_brokerageaccountschwab"."account_number" IN (345643656, 4242345)

It seems like the __in query has removed the encryption "stuff?" Is this intended, is it possible that we augment this to automatically encrypt lists as well?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions