You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
perf(spp_programs): replace Python uniqueness checks with SQL constraints
Python @api.constrains methods performed per-record search() calls during
bulk create, causing O(N^2) behavior. SQL UNIQUE constraints enforce
uniqueness at the database level in O(1) per row.
Also add the entitlement code constraint to entitlement.py (the imported
model) since entitlement_base_model.py is not imported in __init__.py.
Includes pre-migration to deduplicate existing data before constraints apply.
Copy file name to clipboardExpand all lines: spp_programs/__manifest__.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@
4
4
"name": "OpenSPP Programs",
5
5
"summary": "Manage cash and in-kind entitlements, integrate with inventory, and enhance program management features for comprehensive social protection and agricultural support.",
0 commit comments