Skip to content

Commit

Permalink
Warn if background can't be modified
Browse files Browse the repository at this point in the history
Beacuse of an existing genotype with the same background.

Refs #2752
  • Loading branch information
kimrutherford committed Oct 9, 2023
1 parent e170308 commit 5b85095
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion root/static/js/canto-modules.js
Original file line number Diff line number Diff line change
Expand Up @@ -5749,7 +5749,12 @@ var genotypeBackgroundEditDialogCtrl =
var storePromise =
CursGenotypeList.setGenotypeBackground(toaster, $http, args.genotype,
$scope.data.background);
storePromise.then(function () {
storePromise.then(function (result) {
if (result && result.status && result.status === 'existing') {
toaster.pop('warning', 'could not modify background: genotype "' +
args.genotype.display_name +
'" already exists with the same background');
}
$uibModalInstance.close();
});
}
Expand Down

0 comments on commit 5b85095

Please sign in to comment.