From 670b5188751c391ede9c58d861b773763866f27f Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Mon, 9 Jan 2023 09:52:04 -0500 Subject: [PATCH] Include other unique key column in condition in Model\Tag:store - Address https://github.com/friendica/friendica/issues/12486#issuecomment-1372640002 --- src/Model/Tag.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Model/Tag.php b/src/Model/Tag.php index 368be55ddd..8509c30938 100644 --- a/src/Model/Tag.php +++ b/src/Model/Tag.php @@ -119,7 +119,7 @@ class Tag $tag = DBA::selectFirst('tag', ['name', 'type'], ['url' => $url]); if (!empty($tag)) { if ($tag['name'] != substr($name, 0, 96)) { - DBA::update('tag', ['name' => substr($name, 0, 96)], ['url' => $url]); + DBA::update('tag', ['name' => substr($name, 0, 96)], ['url' => $url, 'type' => $tag['type']]); } if (!empty($target) && ($tag['type'] != $target)) { DBA::update('tag', ['type' => $target], ['url' => $url]);