refs #6834 feat:handle Error
gitea/salix/pipeline/pr-dev This commit looks good Details

This commit is contained in:
Sergio De la torre 2024-02-21 07:08:45 +01:00
parent be81835474
commit 614652c357
1 changed files with 6 additions and 6 deletions

View File

@ -12,19 +12,19 @@ BEGIN
DECLARE vHasSectorCollection INT;
SELECT COUNT(id) INTO vHasSaleGroup
FROM vn.saleGroup sg
WHERE sg.id = vSaleGroupFk;
FROM vn.saleGroup
WHERE id = vSaleGroupFk;
IF !vHasSaleGroup THEN
CALL util.throw ("INVALID_SALEGROUP");
CALL util.throw ("invalid saleGroup");
END IF;
SELECT COUNT(id) INTO vHasSectorCollection
FROM vn.sectorCollection scsg
WHERE scsg.id = vSectorCollectionFk;
FROM vn.sectorCollection
WHERE id = vSectorCollectionFk;
IF !vHasSectorCollection THEN
CALL util.throw ("INVALID_SECTORCOLLECTION");
CALL util.throw ("invalid sectorCollection");
END IF;
REPLACE sectorCollectionSaleGroup