Merge pull request 'generated unique slug should be part of diff' (#20) from bugfix/generated-unique-slug-should-be-part-of-diff into master
All checks were successful
soko-web/pipeline/head This commit looks good

Reviewed-on: #20
This commit is contained in:
Bence Pőcze 2023-05-28 15:45:58 +02:00
commit f31b801c03
Signed by: Gitea
GPG Key ID: 7B89B83EED9AD2C6

View File

@ -115,7 +115,7 @@ class PersistentDataManager implements IPersistentDataManager
if (count($modified) > 0) { if (count($modified) > 0) {
if ($model instanceof ModelWithSlug && isset($modified['slug'])) { 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); $modify->setId($id);