Skip to content

Commit

Permalink
Merge pull request openedx#34941 from openedx/mrossier/SONIC-529
Browse files Browse the repository at this point in the history
feat: Added some extra logs
  • Loading branch information
MushtaqRossier authored Jun 7, 2024
2 parents 04f9982 + e8a8532 commit ead0468
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions common/djangoapps/student/models/course_enrollment.py
Original file line number Diff line number Diff line change
Expand Up @@ -1041,14 +1041,17 @@ def refund_cutoff_date(self):
# NOTE: This is here to avoid circular references
from openedx.core.djangoapps.commerce.utils import ECOMMERCE_DATE_FORMAT
date_placed = self.get_order_attribute_value('date_placed')
log.info(f"Successfully retrieved date_placed: {date_placed} from order")

if not date_placed:
order_number = self.get_order_attribute_value('order_number')
if not order_number:
log.info("Failed to get order number")
return None

date_placed = self.get_order_attribute_from_ecommerce('date_placed')
if not date_placed:
log.info("Failed to get date_placed attribute")
return None

# also save the attribute so that we don't need to call ecommerce again.
Expand Down

0 comments on commit ead0468

Please sign in to comment.