This reverts commit 5ca2ae727c.
This commit is contained in:
+3
-10
@@ -80,19 +80,13 @@ def wallpaper_price_new(
|
||||
height,
|
||||
material,
|
||||
market,
|
||||
unit,
|
||||
inquiry=None,
|
||||
):
|
||||
m2_prices = wallpaper_m2_price_new(product_id, material.id, market, inquiry)
|
||||
|
||||
if (unit == 'inch'):
|
||||
width = width * 2.54
|
||||
height = height * 2.54
|
||||
|
||||
sqm = (width / 100) * (height / 100)
|
||||
|
||||
# 0.09 m2 = 30x30 cm, which means we can accept 1 sq feet (0.0929 m2)
|
||||
min_sqm = 0.09
|
||||
min_sqm = 1
|
||||
|
||||
sqm = max(sqm, min_sqm)
|
||||
|
||||
@@ -213,7 +207,6 @@ def inquiry_price_new(
|
||||
):
|
||||
width = kwargs.get("width", inquiry.width)
|
||||
height = kwargs.get("height", inquiry.height)
|
||||
unit = kwargs.get("unit", None)
|
||||
material = kwargs.get("material", inquiry.material)
|
||||
external_id = kwargs.get("external_id")
|
||||
|
||||
@@ -227,9 +220,9 @@ def inquiry_price_new(
|
||||
return prices
|
||||
elif inquiry.product_group == "photo-wallpaper":
|
||||
if is_own_image:
|
||||
prices = wallpaper_price_new(None, width, height, material, inquiry.market, unit, inquiry)
|
||||
prices = wallpaper_price_new(None, width, height, material, inquiry.market, inquiry)
|
||||
else:
|
||||
prices = wallpaper_price_new(product_id, width, height, material, inquiry.market, unit, inquiry)
|
||||
prices = wallpaper_price_new(product_id, width, height, material, inquiry.market, inquiry)
|
||||
else:
|
||||
raise ValueError("Invalid product group: {}".format(inquiry.product_group))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user