Skip to content
This repository has been archived by the owner on Oct 24, 2022. It is now read-only.

Commit

Permalink
Merge pull request #22 from OpenFn/expand_logical
Browse files Browse the repository at this point in the history
Expand the logical argument for upsertIf
  • Loading branch information
taylordowns2000 committed May 27, 2021
2 parents f094a92 + d59f89a commit 85a8969
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/Adaptor.js
Expand Up @@ -437,6 +437,7 @@ const upsertIf = (0, _lodashFp.curry)(function (logical, sObject, externalId, at
connection
} = state;
const finalAttrs = (0, _languageCommon.expandReferences)(attrs)(state);
logical = (0, _languageCommon.expandReferences)(logical)(state);

if (logical) {
console.info(`Upserting ${sObject} with externalId`, externalId, ':', finalAttrs);
Expand Down
2 changes: 2 additions & 0 deletions src/Adaptor.js
Expand Up @@ -308,6 +308,8 @@ export const upsertIf = curry(function (
) {
let { connection } = state;
const finalAttrs = expandReferences(attrs)(state);
logical = expandReferences(logical)(state);

if (logical) {
console.info(
`Upserting ${sObject} with externalId`,
Expand Down

0 comments on commit 85a8969

Please sign in to comment.