fix: refs #7760 collection_assing
gitea/salix/pipeline/pr-test This commit looks good Details
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Guillermo Bonet 2024-10-06 09:07:48 +02:00
parent 7e27026cbc
commit 4a17d9ec0e
1 changed files with 13 additions and 3 deletions

View File

@ -118,9 +118,19 @@ BEGIN
IF vCollectionFk IS NULL THEN
CALL collection_new(vUserFk, vCollectionFk);
START TRANSACTION;
SELECT workerFk INTO vCollectionWorker
FROM `collection`
WHERE id = vCollectionFk FOR UPDATE;
IF vCollectionWorker IS NULL THEN
UPDATE `collection`
SET workerFk = vUserFk
WHERE id = vCollectionFk;
END IF;
COMMIT;
END IF;
END$$
DELIMITER ;