Skip to content

Commit 87ff4c3

Browse files
committed
fix(spp_attachment_av_scan): make encryption provider search deterministic with explicit ordering
1 parent 35df852 commit 87ff4c3

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

spp_attachment_av_scan/models/ir_attachment.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,9 @@ def _get_quarantine_encryption_provider(self):
247247
if provider.exists():
248248
return provider
249249

250-
provider = self.env["spp.encryption.provider"].sudo().search([("type", "=", "jwcrypto")], limit=1) # nosemgrep
250+
provider = self.env["spp.encryption.provider"].sudo().search( # nosemgrep
251+
[("type", "=", "jwcrypto")], order="id asc", limit=1
252+
)
251253

252254
if not provider:
253255
_logger.warning(

0 commit comments

Comments
 (0)