webstaff: copy template fix
authorGalen Charlton <gmc@esilibrary.com>
Thu, 28 Jan 2016 19:32:56 +0000 (14:32 -0500)
committerKathy Lussier <klussier@masslnc.org>
Tue, 2 Feb 2016 19:58:54 +0000 (14:58 -0500)
This patches fixes applying the volume portion of a
template when in the copy template tab of the volume/copy
editor.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Kathy Lussier <klussier@masslnc.org>
Open-ILS/web/js/ui/default/staff/cat/volcopy/app.js

index 760a56b..d90c50e 100644 (file)
@@ -1602,6 +1602,8 @@ function($scope , $q , $window , $routeParams , $location , $timeout , egCore ,
                             $scope.working[k] = angular.copy(v);
                         } else {
                             angular.forEach(v, function (sv,sk) {
+                                if (!(k in $scope.working))
+                                    $scope.working[k] = {};
                                 $scope.working[k][sk] = angular.copy(sv);
                             });
                         }