Use objectForPrimaryKey
This commit is contained in:
parent
9ea5dd7f8c
commit
709ebd4dd5
|
@ -37,7 +37,7 @@ exports.createAdminUser = function () {
|
||||||
};
|
};
|
||||||
|
|
||||||
Realm.open(config).then(realm => {
|
Realm.open(config).then(realm => {
|
||||||
let pendingAdminUser = realm.objects('User').filtered(`id == "${userIdentity}"`)[0];
|
let pendingAdminUser = realm.objectForPrimaryKey('User', userIdentity);
|
||||||
realm.write(() => {
|
realm.write(() => {
|
||||||
pendingAdminUser.isAdmin = true;
|
pendingAdminUser.isAdmin = true;
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue