fix: Iterate over product requirement documents directly

- Iterate over PRD objects instead of just IDs
- Pass PRD ID to delete function correctly
This commit is contained in:
Mahmoud-Emad
2025-11-23 12:13:25 +02:00
parent a080fa8330
commit 69264adc3d

View File

@@ -194,8 +194,8 @@ fn test_prd_list() ! {
}
// Clear any existing PRDs before running the test
existing_prds := db_prd.list()!
for prd_id in existing_prds {
db_prd.delete[ProductRequirementsDoc](u32(prd_id))!
for prd in existing_prds {
db_prd.delete(prd.id)!
}
// Create multiple PRDs