-
Notifications
You must be signed in to change notification settings - Fork 244
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix Invalid Lookups of namespaced fields (#3759)
These modifications address the error reported in Issue #3752. The issue stemmed from the fact that during loading, when namespaces were injected into the mapping, only the key of the lookups dictionary would be altered, not the lookup class itself. For instance, `mapping.lookups` would appear as follows: ``` { <namespace>__<field>__c: MappingLookup(..., name="<field>__c", ...) } ``` In the `_infer_and_validate_lookups` function within `mapping_parser.py`, we validate whether the sObjects mentioned in the mapping file under the lookup field are indeed part of the `referenceTo` of that field. However, the problem arose from the utilization of the `name` attribute under `MappingLookup` instead of the key value. **Change:** We've modified it to reference the `name` with the key value of `mapping.lookups` instead of accessing it within `MappingLookup` class. This way the `name` would be the field with the injected namespace Fixes #3752
- Loading branch information
1 parent
f911075
commit 2b3bdf5
Showing
4 changed files
with
39 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
cumulusci/tests/shared_cassettes/GET_sobjects_Account_describe.yaml
Large diffs are not rendered by default.
Oops, something went wrong.