Open
Description
Hi,
I want to check my code for correct remove object from iobroker database. I have following preset objects:
predefinedObjects: [
{
'_id': 'noolitef.0.testlamp',
'type': 'channel',
// @ts-ignore
'parent': 'noolitef.0',
'children': [
'noolitef.0.testlamp.status',
'noolitef.0.testlamp.channel'
],
'common': {
'name': 'testlamp',
'role': 'light.switch',
'desc': 'fill comment for test purpose'
}
},
{
'_id': 'noolitef.0.badlamp',
'type': 'channel',
// @ts-ignore
'parent': 'noolitef.0',
'children': [
'noolitef.0.badlamp.status',
'noolitef.0.baslamp.channel'
],
'common': {
'name': 'badlamp',
'role': 'light.switch',
'desc': 'fill comment for test purpose'
}
}
],
predefinedStates: {
'noolitef.0.testlamp.status' : {'val' :false, 'ack':false},
'noolitef.0.testlamp.channel' : {'val' :1, 'ack' : false}
}
In main.js I do nothing and then I try to check exits object in database:
const result = database.hasObject('noolitef.0.badlamp');
The 'result' is false. I think that object 'noolitef.0.badlamp' must be exists and 'result' must be 'true'