From 88d7d2c777600e07f8ca77bc9b4771e9ff739286 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C5=91cze=20Bence?= Date: Sat, 27 May 2023 21:27:19 +0200 Subject: [PATCH] generated unique slug should be part of diff --- src/PersistentData/PersistentDataManager.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PersistentData/PersistentDataManager.php b/src/PersistentData/PersistentDataManager.php index e3096d2..4bc99d3 100644 --- a/src/PersistentData/PersistentDataManager.php +++ b/src/PersistentData/PersistentDataManager.php @@ -115,7 +115,7 @@ class PersistentDataManager implements IPersistentDataManager if (count($modified) > 0) { if ($model instanceof ModelWithSlug && isset($modified['slug'])) { - $modified['slug'] = $this->generateUniqueSlug($model, $modified['slug']); + $diff['slug']['new'] = $modified['slug'] = $this->generateUniqueSlug($model, $modified['slug']); } $modify->setId($id);