diff --git a/tests/js/admin-user-helper.js b/tests/js/admin-user-helper.js index b4d9040f..99bd4d4e 100644 --- a/tests/js/admin-user-helper.js +++ b/tests/js/admin-user-helper.js @@ -37,7 +37,7 @@ exports.createAdminUser = function () { }; Realm.open(config).then(realm => { - let pendingAdminUser = realm.objects('User').filtered(`id == "${userIdentity}"`)[0]; + let pendingAdminUser = realm.objectForPrimaryKey('User', userIdentity); realm.write(() => { pendingAdminUser.isAdmin = true; });