Commit cb4538c9 by Braden MacDonald

Fix bug when multiple mentoring blocks are in the same unit, one would disappear on upgrade

parent 4992ce88
...@@ -76,7 +76,7 @@ def upgrade_block(block): ...@@ -76,7 +76,7 @@ def upgrade_block(block):
root.attrib["xml_content"] = xml_content_str root.attrib["xml_content"] = xml_content_str
# Was block already published? # Was block already published?
parent = block.runtime.get_block(block.parent) # Don't use get_parent() as it may be an outdated cached version parent = store.get_item(block.parent) # Don't use get_parent()/get_block() as it may be an outdated cached version
parent_was_published = not store.has_changes(parent) parent_was_published = not store.has_changes(parent)
old_usage_id = block.location old_usage_id = block.location
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment