Skip to content

Commit

Permalink
Show meta device as active (#510)
Browse files Browse the repository at this point in the history
  • Loading branch information
Irvandoval authored Oct 4, 2023
1 parent af5e767 commit 4da4e66
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 3 additions & 1 deletion submodules/devices/devices.js
Original file line number Diff line number Diff line change
Expand Up @@ -1214,7 +1214,9 @@ define(function(require) {
.map(function(device) {
var staticStatusClasses = ['unregistered', 'registered'],
deviceType = device.device_type,
isRegistered = device.registrable ? device.registered : true,
// TODO: this validation should be removed once the backend returns the actual meta device status.
isRegistered = device.device_type === 'meta' ? true :
device.registrable ? device.registered : true,
isEnabled = _.get(device, 'enabled', false),
userName = _
.chain(usersById)
Expand Down
4 changes: 4 additions & 0 deletions submodules/users/users.js
Original file line number Diff line number Diff line change
Expand Up @@ -470,6 +470,10 @@ define(function(require) {
};
},
isRegistered = function(device) {
// TODO: this validation should be removed once the backend returns the actual meta device status.
if (device.device_type === 'meta') {
return true;
}
return _.every([
device.enabled,
device.registrable ? device.registered : true
Expand Down

0 comments on commit 4da4e66

Please sign in to comment.