Skip to content

Commit

Permalink
chore(condo): HOTFIX: fixes on review (#5645)
Browse files Browse the repository at this point in the history
(cherry picked from commit ab2fbcb)
  • Loading branch information
toplenboren committed Dec 19, 2024
1 parent ebbe259 commit 13e8aca
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -725,7 +725,7 @@ const MarketPriceForm = ({ priceFormDescription, removeOperation, organizationPr
{ PerMeterPriceMeasureLabel }
</Select.Option>
<Select.Option
key='oneTime'
key={undefined}
value={undefined}
>
{NoPriceMeasureLabel}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,10 +196,15 @@ export async function createNewPricesAndPriceScopes ({
for (const formPrice of prices) {
const { properties, hasAllProperties, price, priceType, measure } = formPrice

let processedMeasure = measure
if (!measure) {
processedMeasure = undefined
}

const { price: resultPrice, isMin } = getPriceValueFromFormPrice({ priceType, price })

const createdPrice = await createMarketItemPrice({
price: [{ type: 'variant', name: marketItem.name, price: resultPrice, isMin, measure }],
price: [{ type: 'variant', name: marketItem.name, price: resultPrice, isMin, measure: processedMeasure }],
marketItem: { connect: { id: marketItem.id } },
})

Expand Down

0 comments on commit 13e8aca

Please sign in to comment.