Skip to content
This repository has been archived by the owner on Nov 4, 2024. It is now read-only.

Update LMSPublisher to not convert price to integer #3316

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ecommerce/courses/publishers.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def serialize_seat_for_commerce_api(self, seat):
return {
'name': mode_for_product(seat),
'currency': stock_record.price_currency,
'price': int(stock_record.price_excl_tax),
'price': float(stock_record.price_excl_tax),
'sku': stock_record.partner_sku,
'bulk_sku': bulk_sku,
'expires': self.get_seat_expiration(seat),
Expand Down
6 changes: 3 additions & 3 deletions ecommerce/courses/tests/test_publishers.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ def test_serialize_seat_for_commerce_api(self):
expected = {
'name': 'verified',
'currency': 'USD',
'price': int(stock_record.price_excl_tax),
'price': float(stock_record.price_excl_tax),
'sku': stock_record.partner_sku,
'bulk_sku': None,
'expires': None,
Expand Down Expand Up @@ -162,7 +162,7 @@ def test_serialize_seat_for_commerce_api_with_professional(self, is_verified, ex
expected = {
'name': expected_mode,
'currency': 'USD',
'price': int(stock_record.price_excl_tax),
'price': float(stock_record.price_excl_tax),
'sku': stock_record.partner_sku,
'bulk_sku': None,
'expires': None,
Expand All @@ -178,7 +178,7 @@ def test_serialize_seat_with_enrollment_code(self):
expected = {
'name': 'verified',
'currency': 'USD',
'price': int(stock_record.price_excl_tax),
'price': float(stock_record.price_excl_tax),
'sku': stock_record.partner_sku,
'bulk_sku': ec_stock_record.partner_sku,
'expires': None,
Expand Down