Commit 71e25d9b by Calen Pennington

According to the elementtree spec, elements with no children test as false. We…

According to the elementtree spec, elements with no children test as false. We only want to skip checking for module ids if the module is actually not found
parent 585e4c8d
...@@ -202,7 +202,7 @@ def index(request, course=None, chapter="Using the System", section="Hints"): ...@@ -202,7 +202,7 @@ def index(request, course=None, chapter="Using the System", section="Hints"):
module = etree.XML(etree.tostring(module_wrapper[0])) # Copy the element out of the tree module = etree.XML(etree.tostring(module_wrapper[0])) # Copy the element out of the tree
module_ids = [] module_ids = []
if module: if module is not None:
module_ids = module.xpath("//@id", module_ids = module.xpath("//@id",
course=course, chapter=chapter, section=section) course=course, chapter=chapter, section=section)
......
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