Skip to content

Commit

Permalink
refactor: check for upstream_version
Browse files Browse the repository at this point in the history
  • Loading branch information
navinkarkera committed Jan 16, 2025
1 parent 6a93b06 commit b4539a4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions openedx/core/djangoapps/content_libraries/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,8 @@ def create_or_update_xblock_upstream_link(usage_key):
"""
ensure_cms("create_or_update_xblock_upstream_link may only be executed in a CMS context")
xblock = modulestore().get_item(UsageKey.from_string(usage_key))
if not xblock.upstream:
TASK_LOGGER.info(f"No upstream found for xblock: {xblock.usage_key}")
if not xblock.upstream or not xblock.upstream_version:
TASK_LOGGER.info(f"No upstream or upstream_version found for xblock: {xblock.usage_key}")
return
try:
course_name = CourseOverview.get_from_id(xblock.course_id).display_name_with_default
Expand Down

0 comments on commit b4539a4

Please sign in to comment.