Skip to content

Commit

Permalink
#763 Don't clear observable value when changing the datatype in creat…
Browse files Browse the repository at this point in the history
…ion dialog
  • Loading branch information
nadouani committed Oct 18, 2018
1 parent 5e9c2d3 commit 7db613f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ui/app/scripts/controllers/case/ObservableCreationCtrl.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@

$scope.selectDataType = function(type) {
$scope.params.dataType = type;
delete $scope.params.data;
delete $scope.params.attachment;
};

$scope.countObservables = function() {
Expand Down Expand Up @@ -79,10 +77,12 @@
tags: _.unique(_.pluck($scope.tags, 'text'))
};

if (params.data) {
var isFile = params.dataType === 'file';

if (!isFile) {
postData.data = params.data.split('\n');
count = postData.length;
} else if (params.attachment) {
} else {
postData.attachment = params.attachment;

if(params.isZip) {
Expand Down

0 comments on commit 7db613f

Please sign in to comment.