rerobe-js-orm 4.7.5 → 4.7.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/models/Product.js +10 -1
- package/package.json +1 -1
package/lib/models/Product.js
CHANGED
|
@@ -354,7 +354,16 @@ class Product extends Base_1.default {
|
|
|
354
354
|
product_constants_1.PRODUCT_CLASS_VALUES.SUPPLY,
|
|
355
355
|
product_constants_1.PRODUCT_CLASS_VALUES.DIGITAL,
|
|
356
356
|
].includes(String(this.attributes.productClass));
|
|
357
|
-
const
|
|
357
|
+
const liquidationStatuses = [
|
|
358
|
+
product_constants_1.PRODUCT_STATES.archived,
|
|
359
|
+
product_constants_1.PRODUCT_STATES.sellerLiquidated,
|
|
360
|
+
product_constants_1.PRODUCT_STATES.liquidationReady,
|
|
361
|
+
product_constants_1.PRODUCT_STATES.merchantDonated,
|
|
362
|
+
product_constants_1.PRODUCT_STATES.sellerDonated,
|
|
363
|
+
];
|
|
364
|
+
const statusToInclude = !hasShopifyId || (currentStatus.includes('SOLD') && isUnique) || liquidationStatuses.includes(currentStatus)
|
|
365
|
+
? 'DRAFT'
|
|
366
|
+
: undefined;
|
|
358
367
|
if (variantsFromInventory.length === 0) {
|
|
359
368
|
// Fallback: single-variant product (legacy behavior)
|
|
360
369
|
const variant = Object.assign(Object.assign({ id: '' }, baseVariantFields()), { inventoryQuantities: [
|