From c14891e920f467a5500bd01b32bbd97a3d18ed50 Mon Sep 17 00:00:00 2001 From: Andy Armstrong Date: Thu, 28 Aug 2014 20:03:31 -0400 Subject: [PATCH] Pre-cache has_changes when computing ancestors --- cms/djangoapps/contentstore/views/item.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cms/djangoapps/contentstore/views/item.py b/cms/djangoapps/contentstore/views/item.py index 9a5511cf66..5393f6bf68 100644 --- a/cms/djangoapps/contentstore/views/item.py +++ b/cms/djangoapps/contentstore/views/item.py @@ -596,6 +596,9 @@ def _get_module_info(xblock, rewrite_static_links=True): course_id=xblock.location.course_key ) + # Pre-cache has changes for the entire course because we'll need it for the ancestor info + modulestore().has_changes(modulestore().get_course(xblock.location.course_key, depth=None)) + # Note that children aren't being returned until we have a use case. return create_xblock_info(xblock, data=data, metadata=own_metadata(xblock), include_ancestor_info=True)