accounting: stop using portal_catalog.getObject
This is not public API and is not supposed to be used outside of catalog tool. Using getObject here is also wrong because it does not apply security and does not check provided argument type. To prevent retrieving too many documents, we usually pass limit=2 for safety. To detect inconsistencies, when only one result is expected we rely on `brain, = portal_catalog(limit=2)` style unpacking to fail if more than one result were found.
Showing
Please register or sign in to comment