Skip to content

Commit

Permalink
creating new subscription fixed (#139)
Browse files Browse the repository at this point in the history
  • Loading branch information
marslanabdulrauf authored Aug 23, 2023
1 parent 4edbb96 commit 327eec3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions ecommerce/extensions/api/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
REFUND_ORDER_EMAIL_SUBJECT
)
from ecommerce.extensions.catalogue.utils import attach_vouchers_to_coupon_product
from ecommerce.extensions.edly_ecommerce_app.helpers import is_valid_site_course
from ecommerce.extensions.offer.constants import (
OFFER_ASSIGNED,
OFFER_ASSIGNMENT_EMAIL_BOUNCED,
Expand Down
7 changes: 6 additions & 1 deletion ecommerce/extensions/catalogue/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,12 @@ def generate_sku(product, partner):
str(product.attr.UUID),
str(partner.id)
)).encode('utf-8')

elif product.is_subscription_product:
_hash = ' '.join((
getattr(product, 'title', ''),
str(product.attr.subscription_type),
str(partner.id)
)).encode('utf-8')
else:
raise Exception('Unexpected product class')

Expand Down

0 comments on commit 327eec3

Please sign in to comment.