From 72194131c75e8144148cf97725887d084075b15c Mon Sep 17 00:00:00 2001 From: mguschin Date: Tue, 12 May 2026 23:13:39 +0300 Subject: [PATCH] fix: include price multiplier quantity in VK description postfix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit "цена за 10 г." instead of "цена за г." when multiplier is set. Co-Authored-By: Claude Sonnet 4.6 --- web/tasks/vk_sync.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/web/tasks/vk_sync.py b/web/tasks/vk_sync.py index def4558..542b7fc 100644 --- a/web/tasks/vk_sync.py +++ b/web/tasks/vk_sync.py @@ -154,7 +154,11 @@ def _sync_product( multiplier = float(sync_config.price_multiplier) if sync_config and sync_config.price_multiplier else 1.0 price_rubles = _calc_price(product.price) * multiplier measure = (product.measure_name or "").strip() - desc = f"{product.name} (цена за {measure}.)" if measure else product.name + if measure: + qty = int(multiplier) if multiplier == int(multiplier) else multiplier + desc = f"{product.name} (цена за {qty} {measure}.)" + else: + desc = product.name stock = settings.VK_STOCK_AMOUNT if product.allow_to_sell else 0 owner_id = f"-{vk_group_id}" now = _now()