Skip to content

Commit 4e424cf

Browse files
authored
Merge pull request #131 from RotaruDan/objectsNullFix
Fixes ObjectsFields Null Exception
2 parents e12a731 + 5470b00 commit 4e424cf

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@
3030
"recover": "node ./bin/permissions-recover.js"
3131
},
3232
"dependencies": {
33-
"adjective-adjective-animal": "*",
34-
"adm-zip": "*",
33+
"adjective-adjective-animal": "1.3.3",
34+
"adm-zip": "0.4.7",
3535
"async": "^1.3.x",
3636
"body-parser": "^1.13.x",
3737
"co": "4.6.x",

routes/kibana.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@ var defaultObject = {
388388
name: '',
389389
gameplayId: '',
390390
type_hashCode: 0,
391-
score: 0,
391+
score: 0.01,
392392
response: '',
393393
type: '',
394394
event_hashcode: 0,
@@ -400,14 +400,14 @@ var defaultObject = {
400400
timestamp: '2000-01-19T11:05:27.772Z',
401401
target_hashCode: 0,
402402
stored: '2000-01-19T11:05:27.772Z',
403-
progress: 0,
404-
time: 0,
403+
progress: 0.01,
404+
time: 0.01,
405405
ext: {
406-
progress: 0,
407-
time: 0,
406+
progress: 0.01,
407+
time: 0.01,
408408
location: {
409-
lat: 0,
410-
lon: 0
409+
lat: 0.01,
410+
lon: 0.01
411411
}
412412
}
413413
}
@@ -1000,7 +1000,7 @@ router.post('/index/:indexTemplate/:indexName', function (req, res) {
10001000
q: '_id:' + 'object_fields' + versionId
10011001
}, function (error, response) {
10021002

1003-
if (response.hits.hits && response.hits.hits.length > 0) {
1003+
if (!error && response.hits && response.hits.hits && response.hits.hits.length > 0) {
10041004
objectfields = response.hits.hits[0]._source;
10051005
}
10061006

0 commit comments

Comments
 (0)