chore: Fix merge conflicts with master

This commit is contained in:
olivermrbl committed 2023-03-03 12:01:35 +01:00
commit ad99a8bd24
66 files changed
+1556 -1465

No files matched your search

+6
View File
@@ -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 -1
View File
@@ -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()