mirror of
https://git.rwth-aachen.de/acs/public/villas/web/
synced 2025-03-09 00:00:01 +01:00
Fix receiving entities with no attributes
This commit is contained in:
parent
833c61a303
commit
bfb2e155b4
2 changed files with 11 additions and 11 deletions
|
@ -8,8 +8,6 @@ export default DS.Model.extend({
|
|||
poll: function() {
|
||||
var _this = this;
|
||||
Ember.run.later( function() {
|
||||
Ember.debug("reload");
|
||||
|
||||
_this.reload();
|
||||
_this.poll();
|
||||
}, 1000);
|
||||
|
|
|
@ -39,16 +39,18 @@ export default DS.RESTSerializer.extend({
|
|||
}
|
||||
}
|
||||
|
||||
item.contextElement.attributes.forEach(function(attribute) {
|
||||
var property = {
|
||||
name: attribute.name,
|
||||
value: attribute.value,
|
||||
type: attribute.type,
|
||||
timestamp: attribute.metadatas[0].value
|
||||
}
|
||||
if (item.contextElement.attributes) {
|
||||
item.contextElement.attributes.forEach(function(attribute) {
|
||||
var property = {
|
||||
name: attribute.name,
|
||||
value: attribute.value,
|
||||
type: attribute.type,
|
||||
timestamp: attribute.metadatas[0].value
|
||||
}
|
||||
|
||||
entity.attributes.properties.push(property);
|
||||
});
|
||||
entity.attributes.properties.push(property);
|
||||
});
|
||||
}
|
||||
|
||||
// pass entity to caller function
|
||||
if (handleEntity(entity) == false) {
|
||||
|
|
Loading…
Add table
Reference in a new issue