From 1ef83ab57b1b758efac0b26c4d4624aad2925d99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C5=91cze=20Bence?= Date: Sun, 7 May 2023 01:35:48 +0200 Subject: [PATCH] fixup! handle slugs in persistent data manager --- src/PersistentData/PersistentDataManager.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/PersistentData/PersistentDataManager.php b/src/PersistentData/PersistentDataManager.php index 60fec89..e3096d2 100644 --- a/src/PersistentData/PersistentDataManager.php +++ b/src/PersistentData/PersistentDataManager.php @@ -125,7 +125,8 @@ class PersistentDataManager implements IPersistentDataManager } } else { if ($model instanceof ModelWithSlug) { - $modified['slug'] = $this->generateUniqueSlug($model, $modified['slug']); + $slug = $model->generateSlug(); + $modified['slug'] = $this->generateUniqueSlug($model, $slug); } $modify->fill($modified);