Skip to content

Commit

Permalink
ID Deduplication: Code refactor
Browse files Browse the repository at this point in the history
Signed-off-by: mkumar-02 <[email protected]>
  • Loading branch information
mkumar-02 committed Aug 9, 2024
1 parent 4bb072f commit 3678514
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 112 deletions.
110 changes: 0 additions & 110 deletions g2p_registration_portal_user/i18n/g2p_registration_portal_user.pot

This file was deleted.

4 changes: 2 additions & 2 deletions g2p_registry_id_deduplication/models/registrant.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

from odoo import _, fields, models
from odoo.exceptions import UserError
from odoo.tools import safe_eval

_logger = logging.getLogger(__name__)

Expand Down Expand Up @@ -108,8 +109,7 @@ def get_id_types_with_kind(self, id_field, is_group):
ir_config = self.env["ir.config_parameter"].sudo()
id_type_ids_str = ir_config.get_param(f"g2p_registry_id_deduplication.{id_field}", default=None)

id_type_ids = id_type_ids_str.strip("][").split(", ") if id_type_ids_str is not None else [""]
id_type_ids = id_type_ids if len(id_type_ids[0]) != 0 else []
id_type_ids = safe_eval.safe_eval(id_type_ids_str)

if len(id_type_ids) < 1:
raise UserError(_("Deduplication is not configured"))
Expand Down

0 comments on commit 3678514

Please sign in to comment.