Skip to content

Commit

Permalink
fix: update how fallback value is defined for enrollment_end (#921)
Browse files Browse the repository at this point in the history
  • Loading branch information
brobro10000 authored Aug 27, 2024
1 parent beb6f01 commit 555e018
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion enterprise_catalog/apps/catalog/algolia_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1258,7 +1258,7 @@ def _get_course_run_enroll_by_date_timestamp(full_course_run):
since Algolia cannot filter on null values
"""
upgrade_deadline_timestamp = _get_verified_upgrade_deadline(full_course_run=full_course_run)
enrollment_end_timestamp = full_course_run.get('enrollment_end', ALGOLIA_DEFAULT_TIMESTAMP)
enrollment_end_timestamp = full_course_run.get('enrollment_end') or ALGOLIA_DEFAULT_TIMESTAMP
if not isinstance(enrollment_end_timestamp, (int, float)):
enrollment_end_timestamp = to_timestamp(enrollment_end_timestamp)
return min(enrollment_end_timestamp, upgrade_deadline_timestamp)
Expand Down

0 comments on commit 555e018

Please sign in to comment.