Skip to content

Commit

Permalink
Update marketing_url for course runs - EDLY-6224
Browse files Browse the repository at this point in the history
  • Loading branch information
Taimoor Ahmed authored and Taimoor Ahmed committed Nov 20, 2023
1 parent af88aab commit 8920d45
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions course_discovery/apps/course_metadata/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -1515,12 +1515,7 @@ def program_types(self):

@property
def marketing_url(self):
# If the type isn't marketable, don't expose a marketing URL at all, to avoid confusion.
# This is very similar to self.could_be_marketable, but we don't use that because we
# still want draft runs to expose a marketing URL.
type_is_marketable = self.type.is_marketable

if self.slug and type_is_marketable:
if self.slug:
path = 'course/{slug}'.format(slug=self.slug)
return urljoin(self.course.partner.marketing_site_url_root, path)

Expand Down

0 comments on commit 8920d45

Please sign in to comment.