chore: Fix merge conflicts with master
This commit is contained in:
@@ -1,5 +1,12 @@
|
||||
# @medusajs/inventory
|
||||
|
||||
## 1.0.8
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`c43248131`](https://github.com/medusajs/medusa/commit/c432481319cc205938081c3fcf60e75053b659ca)]:
|
||||
- @medusajs/medusa@1.7.11
|
||||
|
||||
## 1.0.7
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@medusajs/inventory",
|
||||
"version": "1.0.7",
|
||||
"version": "1.0.8",
|
||||
"description": "Inventory Module for Medusa",
|
||||
"main": "dist/index.js",
|
||||
"repository": {
|
||||
@@ -35,7 +35,7 @@
|
||||
"test:unit": "jest --passWithNoTests"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@medusajs/medusa": "1.7.10",
|
||||
"@medusajs/medusa": "1.7.11",
|
||||
"typeorm": "^0.3.11"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
# Change Log
|
||||
|
||||
## 1.7.11
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#3357](https://github.com/medusajs/medusa/pull/3357) [`c43248131`](https://github.com/medusajs/medusa/commit/c432481319cc205938081c3fcf60e75053b659ca) Thanks [@riqwan](https://github.com/riqwan)! - fix(medusa): fix error on creating product without FF sales channel
|
||||
|
||||
## 1.7.10
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@medusajs/medusa",
|
||||
"version": "1.7.10",
|
||||
"version": "1.7.11",
|
||||
"description": "E-commerce for JAMstack",
|
||||
"main": "dist/index.js",
|
||||
"bin": "./cli.js",
|
||||
|
||||
@@ -42,6 +42,7 @@ import {
|
||||
} from "./transaction/create-product-variant"
|
||||
import { DistributedTransaction } from "../../../../utils/transaction"
|
||||
import { Logger } from "../../../../types/global"
|
||||
import { FlagRouter } from "../../../../utils/flag-router"
|
||||
|
||||
/**
|
||||
* @oas [post] /admin/products
|
||||
@@ -117,6 +118,8 @@ export default async (req, res) => {
|
||||
const shippingProfileService: ShippingProfileService = req.scope.resolve(
|
||||
"shippingProfileService"
|
||||
)
|
||||
const featureFlagRouter: FlagRouter = req.scope.resolve("featureFlagRouter")
|
||||
|
||||
const productVariantInventoryService: ProductVariantInventoryService =
|
||||
req.scope.resolve("productVariantInventoryService")
|
||||
const inventoryService: IInventoryService | undefined =
|
||||
@@ -148,8 +151,12 @@ export default async (req, res) => {
|
||||
.retrieveDefault()
|
||||
}
|
||||
|
||||
// If no sales channel available, set the default one
|
||||
if (!validated?.sales_channels?.length) {
|
||||
// Provided that the feature flag is enabled and
|
||||
// no sales channels are available, set the default one
|
||||
if (
|
||||
featureFlagRouter.isFeatureEnabled(SalesChannelFeatureFlag.key) &&
|
||||
!validated?.sales_channels?.length
|
||||
) {
|
||||
const defaultSalesChannel = await salesChannelService
|
||||
.withTransaction(manager)
|
||||
.retrieveDefault()
|
||||
|
||||
Reference in New Issue
Block a user