webstaff: copy template fix
authorGalen Charlton <gmc@esilibrary.com>
Thu, 28 Jan 2016 19:32:56 +0000 (14:32 -0500)
committerGalen Charlton <gmc@esilibrary.com>
Thu, 28 Jan 2016 19:32:56 +0000 (14:32 -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>
Open-ILS/web/js/ui/default/staff/cat/volcopy/app.js

index 9732361..aa90f16 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);
                             });
                         }