Fix course export issue

This commit is contained in:
Giovanni Cimolin da Silva
2019-12-10 09:39:27 -03:00
parent ba4de2f933
commit a78c21db10

View File

@@ -324,12 +324,14 @@ class MongoContentStore(ContentStore):
# Set values if result of query is empty
count = 0
assets = []
if cursor.alive:
try:
result = cursor.next()
if result:
count = result['count']
assets = list(result['results'])
except StopIteration:
# Skip if no assets were returned
pass
# We're constructing the asset key immediately after retrieval from the database so that
# callers are insulated from knowing how our identifiers are stored.