-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Description
Bug: Import Scheme rule "If object is not found" = Treat as Error is ignored (PriceHistory import)
Summary
In Simple Entity Import Scheme Manager (v2), setting Import Rules → If object is not found = Treat as Error does not prevent booking.
When an object referenced by an input field is missing (e.g., Pricing Policy), the import still succeeds and the item is booked using a default value.
You can see the setting in com.finmars.standard-import-from-file:instruments.pricehistory:prices_prc:

Environment
- PMS Core: latest
- Import scheme user code:
com.finmars.standard-import-from-file:instruments.pricehistory:prices_prc - UI: Simple Entity Import Scheme Manager (v2)
Steps to Reproduce
- Install latest PMS Core
- Open Import → Import Data from File
- Select entity
Price History - Select Import Scheme
STD - PRC - Import a row with a non-existing Pricing Policy:
[
{
"Accrued Price": 0,
"Date": "2011-08-05T00:00:00",
"Factor": 1,
"Instrument ID": "-",
"Modified Duration": 0,
"Pricing Policy": "com.finmars.standard-pricing:doesnt_exist",
"Principal Price": 1,
"YTM": 0,
"is_temporary_price": false,
"long_delta": 0,
"short_delta": 0
}
]
Actual Result
"com.finmars.standard-pricing:doesnt_exist"is not found- Key
pricing_policyis removed fromfinal_inputs - Error message is formed:
None Relation model error: KeyError('pricing_policy') - Import finishes with
status: "success" - Price is booked (default pricing policy is applied)
Example response:
{
"error_message": "None Relation model error: KeyError('pricing_policy')",
"final_inputs": {
"accrued_price": 0,
"date": "2011-08-05",
"factor": 1,
"instrument": "-",
"principal_price": 1
},
"message": "Item Imported pricehistory",
"status": "success"
}Expected Result
"com.finmars.standard-pricing:doesnt_exist"is not found- Key
pricing_policyis removed fromfinal_inputs - Error message is formed
- Import result must be
status: "error" - Price must NOT be booked
Notes
It appears that when a referenced relation is not found:
- the field is removed from
final_inputs - an error message is generated
- but the pipeline continues and applies defaults
The "Treat as Error" rule does not escalate the failure to an error status and does not stop booking.
Reactions are currently unavailable