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

Commit

Permalink
Change LMSPublisher serializer to not convert price to integer, letti…
Browse files Browse the repository at this point in the history
…ng LMS handle the conversion
  • Loading branch information
julianajlk committed Feb 12, 2021
1 parent 2151b73 commit 1f29582
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
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

0 comments on commit 1f29582

Please sign in to comment.