Signed-off-by: Bill Erickson <berickxx@gmail.com>
Signed-off-by: Jane Sandberg <js7389@princeton.edu>
Signed-off-by: Galen Charlton <gmc@equinoxOLI.org>
map.ischanged(true);
map.isdeleted(false);
} else {
- map.isdeleted(true);
+ if (map.isnew()) {
+ // Deleting a stat cat that was created during this
+ // edit session just means removing it from the list
+ // of maps to consider.
+ this.patron.stat_cat_entries(
+ this.patron.stat_cat_entries()
+ .filter(m => m.stat_cat() !== cat.id())
+ );
+ } else {
+ map.isdeleted(true);
+ }
}
} else {
map = this.idl.create('actscecm');