Skip to content

Commit 2fb374d

Browse files
gonzalesedwin1123kneckinator
authored andcommitted
fix(spp_registry_search): add nosemgrep comments for sudo on ir.config_parameter
1 parent 74adc04 commit 2fb374d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

spp_registry_search/models/res_partner.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def action_unarchive(self):
6363
@api.model
6464
def get_search_config(self):
6565
"""Return registry search configuration for the JS portal."""
66-
get_param = self.env["ir.config_parameter"].sudo().get_param
66+
get_param = self.env["ir.config_parameter"].sudo().get_param # nosemgrep: odoo-sudo-without-context
6767
result_limit = int(get_param("spp_registry_search.result_limit", "50"))
6868
min_chars = int(get_param("spp_registry_search.min_chars", "3"))
6969
return {
@@ -95,7 +95,7 @@ def search_registrants(self, search_term, search_type="all", search_field=None,
9595
return []
9696

9797
# Read config with fallback defaults
98-
get_param = self.env["ir.config_parameter"].sudo().get_param
98+
get_param = self.env["ir.config_parameter"].sudo().get_param # nosemgrep: odoo-sudo-without-context
9999
config_limit = int(get_param("spp_registry_search.result_limit", "50"))
100100
limit = max(10, min(200, limit or config_limit))
101101

0 commit comments

Comments
 (0)