fix the case when relation is set to null #21

Merged
bence merged 1 commits from bugfix/fix-when-relation-is-set-to-null into master 2023-05-28 15:47:27 +02:00

View File

@ -302,6 +302,8 @@ class PersistentDataManager implements IPersistentDataManager
if ($relationModel !== null) { if ($relationModel !== null) {
$model->$methodSet($relationModel->getId()); $model->$methodSet($relationModel->getId());
} else {
$model->$methodSet(null);
} }
} }
} }