Skip to content

Commit

Permalink
Merge pull request #30818 from eileenmcnaughton/575_i
Browse files Browse the repository at this point in the history
dev/core#5370 Fix bug handling soft credits in civi-import
  • Loading branch information
totten authored Aug 8, 2024
2 parents 0bfc70b + c3f37a8 commit 2713c2a
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion ext/civiimport/ang/crmCiviimport.js
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,7 @@
* @type {$scope.save}
*/
$scope.save = (function ($event) {
$event.preventDefault();
$scope.userJob.metadata.entity_configuration = {};
$scope.userJob.metadata.import_mappings = [];
_.each($scope.entitySelection, function (entity) {
Expand All @@ -280,7 +281,16 @@
entity_data: entityConfig
});
});
crmApi4('UserJob', 'save', {records: [$scope.userJob]});
crmApi4('UserJob', 'save', {records: [$scope.userJob]})
.then(function(result) {
// Only post the form if the save succeeds.
document.getElementById("MapField").submit();
},
function(failure) {
// @todo add more error handling - for now, at least we waited...
document.getElementById("MapField").submit();
}
);
});

$scope.load();
Expand Down

0 comments on commit 2713c2a

Please sign in to comment.