Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Fix variant creation
dominik-zeglen07c670300a74
diff --git a/saleor/static/dashboard-next/products/components/ProductVariantAttributes/ProductVariantAttributes.tsx b/saleor/static/dashboard-next/products/components/ProductVariantAttributes/ProductVariantAttributes.tsxindex d8321a0a10..d8c8dc44cc 100644--- a/saleor/static/dashboard-next/products/components/ProductVariantAttributes/ProductVariantAttributes.tsx+++ b/saleor/static/dashboard-next/products/components/ProductVariantAttributes/ProductVariantAttributes.tsx@@ -61,8 +61,7 @@ const ProductVariantAttributes = withStyles(styles, {<Card className={classes.card}><CardTitle title={i18n.t("General Information")} /><CardContent className={classes.grid}>- {attributes === undefined &&- (console.log(data) || data.attributes.length) === 0 ? (+ {attributes === undefined && data.attributes.length === 0 ? (<Skeleton />) : (data.attributes.map((attribute, attributeIndex) => {diff --git a/saleor/static/dashboard-next/products/components/ProductVariantCreatePage/ProductVariantCreatePage.tsx b/saleor/static/dashboard-next/products/components/ProductVariantCreatePage/ProductVariantCreatePage.tsxindex b9da7369ce..03ab9d90b7 100644--- a/saleor/static/dashboard-next/products/components/ProductVariantCreatePage/ProductVariantCreatePage.tsx+++ b/saleor/static/dashboard-next/products/components/ProductVariantCreatePage/ProductVariantCreatePage.tsx@@ -18,16 +18,16 @@ import ProductVariantPrice from "../ProductVariantPrice";import ProductVariantStock from "../ProductVariantStock";interface FormData {- attributes?: Array<{+ attributes: Array<{name: string;slug: string;value: string;}>;- costPrice?: string;- images?: string[];- priceOverride?: string;- quantity?: number;- sku?: string;+ costPrice: string;+ images: string[];+ priceOverride: string;+ quantity: number;+ sku: string;}interface ProductVariantCreatePageProps {diff --git a/saleor/static/dashboard-next/products/views/ProductVariantCreate.tsx b/saleor/static/dashboard-next/products/views/ProductVariantCreate.tsxindex b4ded981b4..bf9a60c7fc 100644--- a/saleor/static/dashboard-next/products/views/ProductVariantCreate.tsx+++ b/saleor/static/dashboard-next/products/views/ProductVariantCreate.tsx@@ -17,12 +17,12 @@ interface ProductUpdateProps {}interface FormData {- attributes?: Array<{+ attributes: Array<{slug: string;value: string;}>;- costPrice?: string;- priceOverride?: string;+ costPrice: string;+ priceOverride: string;quantity: number;sku: string;}