diff --git a/controllers/utils.js b/controllers/utils.js index e0fc4f26..8fe9ab7b 100644 --- a/controllers/utils.js +++ b/controllers/utils.js @@ -445,7 +445,7 @@ async function getAllVersions(obj) { throw new Error("Object has no valid history.prime value") } //All the children of this object will have its @id in __rerum.history.prime - ls_versions = await db.find({ "__rerum.history.prime": rootObj['@id'] }).toArray() + ls_versions = await db.find({ "__rerum.history.prime": { $eq: rootObj['@id'] } }).toArray() //The root object is a version, prepend it in ls_versions.unshift(rootObj) return ls_versions