Skip to content

Commit aec640a

Browse files
committed
fix(constants): rename TRANSFER_RESELLER_PRODUCT_ID to TRANSFER_RESELLER_ITEM_SKU and update references
1 parent cc3c648 commit aec640a

3 files changed

Lines changed: 5 additions & 4 deletions

File tree

adobe_vipm/flows/constants.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
)
1414
from adobe_vipm.flows.errors import ValidationError
1515

16-
TRANSFER_RESELLER_PRODUCT_ID = "adobe-reseller-transfer"
16+
TRANSFER_RESELLER_ITEM_SKU = "adobe-reseller-transfer"
1717

1818

1919
class OrderType(StrEnum):

adobe_vipm/flows/sync/agreement.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
TEMPLATE_ASSET_DEFAULT,
2424
TEMPLATE_SUBSCRIPTION_EXPIRED,
2525
TEMPLATE_SUBSCRIPTION_TERMINATION,
26+
TRANSFER_RESELLER_ITEM_SKU,
2627
AgreementStatus,
2728
ItemTermsModel,
2829
Param,
@@ -564,11 +565,10 @@ def _update_agreement_line_prices(
564565
def _get_processable_agreement_lines(self, agreement: dict) -> list[tuple[dict, str]]:
565566
agreement_lines = []
566567
for line in agreement["lines"]:
567-
if line["item"]["externalIds"]["vendor"] != "adobe-reseller-transfer":
568+
if line["item"]["externalIds"]["vendor"] != TRANSFER_RESELLER_ITEM_SKU:
568569
actual_sku = models.get_adobe_sku(
569570
line["item"]["externalIds"]["vendor"], get_market_segment(self.product_id)
570571
)
571-
572572
agreement_lines.append((line, actual_sku))
573573
return agreement_lines
574574

adobe_vipm/flows/validation/transfer.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
ERR_ADOBE_UNEXPECTED_ERROR,
3131
ERR_NO_SUBSCRIPTIONS_WITHOUT_DEPLOYMENT,
3232
ERR_UPDATING_TRANSFER_ITEMS,
33+
TRANSFER_RESELLER_ITEM_SKU,
3334
Param,
3435
)
3536
from adobe_vipm.flows.context import Context
@@ -532,7 +533,7 @@ class AddResellerChangeLinesToOrder(Step):
532533
def __call__(self, mpt_client, context, next_step):
533534
"""Add lines from reseller change back to the MPT order."""
534535
reseller_change_item = get_product_items_by_skus(
535-
mpt_client, context.order["agreement"]["product"]["id"], ["adobe-reseller-transfer"]
536+
mpt_client, context.order["agreement"]["product"]["id"], [TRANSFER_RESELLER_ITEM_SKU]
536537
)
537538

538539
if not reseller_change_item:

0 commit comments

Comments
 (0)