u
This commit is contained in:
@@ -64,7 +64,7 @@ export default function setOptionsByArticleSku(provider) {
|
||||
const { articleId, companyId, companyuserId } = await resolve(googleAuthId, sku, runner);
|
||||
|
||||
const artRes = await runner.query(
|
||||
'SELECT id, is_father, articlelist_id, optionslist_id FROM article WHERE id = @articleId',
|
||||
'SELECT id, is_parent, articlelist_id, optionslist_id FROM article WHERE id = @articleId',
|
||||
{ articleId },
|
||||
);
|
||||
const article = artRes.rows[0];
|
||||
@@ -72,8 +72,8 @@ export default function setOptionsByArticleSku(provider) {
|
||||
throw new Error('Article not found');
|
||||
}
|
||||
|
||||
if (article.is_father) {
|
||||
throw new Error('A father article cannot have options');
|
||||
if (article.is_parent) {
|
||||
throw new Error('A parent article cannot have options');
|
||||
}
|
||||
|
||||
// If options is empty: clear optionslist
|
||||
|
||||
Reference in New Issue
Block a user