Skip to content

Commit e38878a

Browse files
Cyrille Bourgoisantleblanc
authored andcommitted
fix(dedicated): fix use of lodash identity pick (#1363)
1 parent 7fbb747 commit e38878a

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

packages/manager/apps/dedicated/client/app/account/otrs/otrs.service.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import identity from 'lodash/identity';
2-
import pick from 'lodash/pick';
2+
import pickBy from 'lodash/pickBy';
33
import set from 'lodash/set';
44

55
angular
@@ -64,7 +64,7 @@ angular
6464
}
6565
return OvhHttp.get('/support/tickets', {
6666
rootPath: 'apiv6',
67-
params: pick(filters, identity),
67+
params: pickBy(filters, identity),
6868
});
6969
};
7070

packages/manager/apps/dedicated/client/app/account/user/infos/user-infos.controller.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import identity from 'lodash/identity';
22
import pick from 'lodash/pick';
3+
import pickBy from 'lodash/pickBy';
34

45
angular.module('UserAccount').controller('UserAccount.controllers.Infos', [
56
'$scope',
@@ -66,7 +67,7 @@ angular.module('UserAccount').controller('UserAccount.controllers.Infos', [
6667
$scope.user = pick(response, fieldNames.concat('customerCode'));
6768

6869
// remove empty attributes
69-
$scope.user = pick($scope.user, identity);
70+
$scope.user = pickBy($scope.user, identity);
7071

7172
// juste in case birthday date is retrieved in legacy format
7273
// we nullify it so we don't break the first call to /rules

0 commit comments

Comments
 (0)