Skip to content

Commit

Permalink
refactor: apply review suggestion on fix
Browse files Browse the repository at this point in the history
  • Loading branch information
tecoholic committed Sep 25, 2024
1 parent c472007 commit 198c47a
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions course_discovery/apps/course_metadata/data_loaders/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -572,10 +572,7 @@ def update_seats(self, body):
def update_seat(self, course_run, product_body):
stock_record = product_body['stockrecords'][0]
currency_code = stock_record['price_currency']
if 'price_excl_tax' in stock_record:
price = Decimal(stock_record['price_excl_tax'])
else:
price = Decimal(stock_record['price'])
price = Decimal(stock_record.get('price_excl_tax', stock_record['price']))
sku = stock_record['partner_sku']

# For more context see ADR docs/decisions/0025-dont-sync-mobile-skus-on-discovery.rst
Expand Down

0 comments on commit 198c47a

Please sign in to comment.