u
This commit is contained in:
@@ -91,9 +91,9 @@ export default function create(provider) {
|
||||
runner,
|
||||
);
|
||||
|
||||
const artCheck = await runner.query('SELECT is_father FROM article WHERE id = @articleId', { articleId });
|
||||
if (artCheck.rows[0]?.is_father) {
|
||||
throw new Error('A father article cannot have suppliers');
|
||||
const artCheck = await runner.query('SELECT is_parent FROM article WHERE id = @articleId', { articleId });
|
||||
if (artCheck.rows[0]?.is_parent) {
|
||||
throw new Error('A parent article cannot have suppliers');
|
||||
}
|
||||
|
||||
await assertSupplier(runner, companyId, entityId);
|
||||
|
||||
Reference in New Issue
Block a user