Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions client/app/dashboard/model/edit/ModelEdit.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,13 @@ angular.module('dashboard.Dashboard.Model.Edit', [

//Check to see if editing model
var id = null;
if ($stateParams.id && $stateParams.id > 0) id = $stateParams.id;
if ($scope.action.options.id && $scope.action.options.id > 0) id = $scope.action.options.id;
if ($stateParams.id && $scope.action.options && $scope.action.options.allowAlphaNumericSearch) {
// allow alpha numeric search - some endpoints findById doesn't accept id (number)
id = $stateParams.id;
} else {
if ($stateParams.id && $stateParams.id > 0) id = $stateParams.id;
if ($scope.action.options.id && $scope.action.options.id > 0) id = $scope.action.options.id;
}
if (id) {
$scope.isEdit = true;
$scope.modelDisplay = null; //reset model display to prevent caching
Expand Down