Copy the callnumbers and statcats objects when saving
copy templates to prevent accidental and confusing
editing of in-memory copies.
cesardv: changed tabs to spaces.
Signed-off-by: Jason Boyer <jboyer@library.in.gov>
Signed-off-by: Cesar Velez <cesar.velez@equinoxinitiative.org>
Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
if (angular.isObject(v)) { // we'll use the pkey
if (v.id) v = v.id();
else if (v.code) v = v.code();
+ else v = angular.copy(v); // Should only be statcats and callnumbers currently
}
tmpl[k] = v;