To create a relation I use this code and the relation is created.
Future<void> followUser(uid) async {
var user = await UserModel.getObject(uid);
var currentUser = await getCurrentUser();
final relation = currentUser?.getRelation('subscribes');
relation?.add(user.result);
await currentUser?.save();
}
To remove a relation, I use a similar code, only I replace “add” with “remove”.
But the relation is not removed. And the following message appears in the parse-server logs: “Uncaught internal server error. Cannot read properties of undefined (reading ‘className’)”