fix: properly check if an object exists before update

Closes #70
This commit is contained in:
Jovan Krunić
2021-04-27 13:01:40 +02:00
committed by Rainer Killinger
parent 0c43be2dbe
commit e165837a15
+1 -1
View File
@@ -234,7 +234,7 @@ export class Elasticsearch implements Database {
size: 1,
});
if (searchResponse.body.hits.total > 1) {
if (searchResponse.body.hits.total > 0) {
return {
exists: true,
object: searchResponse.body.hits.hits[0],