Line 238: |
Line 238: |
| debuglog(inp_obj); | | debuglog(inp_obj); |
| store.put(inp_obj); | | store.put(inp_obj); |
| + | } |
| + | |
| + | if ( sqitch === "import record" ) { |
| + | if ( control_1 != undefined ) { |
| + | // Only import if control_1 is a non-empty object |
| + | if ( ( !Array.isArray(control_1) ) && ( Object.keys(control_1).length > 0 ) ) { |
| + | Object.keys(control_1).forEach( function( importkey ){ |
| + | if (src.hasOwnProperty(importkey)) { inp_obj[importkey] = src[importkey] }; |
| + | }) |
| + | store.put(inp_obj); |
| + | } |
| + | } |
| } | | } |
| | | |