Skip to content
This repository has been archived by the owner on Sep 12, 2024. It is now read-only.

Commit

Permalink
Fixed encryption decrytion issues in 17.0
Browse files Browse the repository at this point in the history
Signed-off-by: Lalith Kota <[email protected]>
  • Loading branch information
lalithkota committed Apr 22, 2024
1 parent 3cc8e64 commit 14ddb6f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion g2p_registry_encryption/models/partner.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ def create(self, vals_list):
if not is_encrypt_fields:
return super().create(vals_list)

vals_list = [vals_list] if isinstance(vals_list, dict) else vals_list

prov = self.env["g2p.encryption.provider"].get_registry_provider()
for vals in vals_list:
if vals.get("is_registrant", False):
Expand Down Expand Up @@ -69,8 +71,8 @@ def write(self, vals):
return super().write(vals)

def _fetch_query(self, query, fields):
fields = set(fields)
res = super()._fetch_query(query, fields)
fields = {field.name for field in fields}
prov = self.env["g2p.encryption.provider"].get_registry_provider()
enc_fields_set = prov.get_registry_fields_set_to_enc().intersection(fields)
if not enc_fields_set:
Expand Down

0 comments on commit 14ddb6f

Please sign in to comment.