fix: use item_id (singular) in market.removeFromAlbum call

VK API v5.199 requires item_id not item_ids for market.removeFromAlbum.
The wrong parameter name caused silent failures — products were not
actually removed from their old album when moved to a new one.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
mguschin
2026-05-12 21:34:14 +03:00
parent 83edac4200
commit bb9fc71ed8

View File

@@ -221,7 +221,7 @@ def _sync_product(
old_album_id = str(vk_p.album_id) old_album_id = str(vk_p.album_id)
_vk_post("market.removeFromAlbum", { _vk_post("market.removeFromAlbum", {
"owner_id": owner_id, "owner_id": owner_id,
"item_ids": product.vk_product_id, "item_id": product.vk_product_id,
"album_ids": old_album_id, "album_ids": old_album_id,
}, token) }, token)
resp_album = _vk_post("market.addToAlbum", { resp_album = _vk_post("market.addToAlbum", {