|
@@ -135,7 +135,8 @@ const mm = db => {
|
|
|
for (const ref of removedRefs){
|
|
|
try { await ref } catch (e) {console.log('SYNC RELATIONS REMOVE ERROR') }
|
|
|
|
|
|
- await ref.removeRelation(this, relation)
|
|
|
+ if (ref instanceof Savable)
|
|
|
+ await ref.removeRelation(this, relation)
|
|
|
}
|
|
|
}
|
|
|
if (valueAsArray){
|
|
@@ -264,7 +265,8 @@ const mm = db => {
|
|
|
await ref
|
|
|
}
|
|
|
catch (e) {console.log('DELETE SYNC RELATIONS ERROR') }
|
|
|
- await ref.removeRelation(this, relation)
|
|
|
+ if (ref instanceof Savable)
|
|
|
+ await ref.removeRelation(this, relation)
|
|
|
}
|
|
|
}
|
|
|
}
|