Skip to content

Commit ac13537

Browse files
Merge pull request #133 from Code-Institute-Org/fix_possible_activitylog_bug
Fix for possible student activity bug caused by deployments of differ…
2 parents 2986d54 + 6958c95 commit ac13537

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lms/djangoapps/ci_program/models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ def _find_section_unit(self, module_tree, activity_log, xblock_id):
296296
latest_course_id = latest_course_key.html_id().split(':')[1]
297297
block_id = activity_log[0].module_state_key.block_id
298298
course_xblock = self._find_course(latest_course_id, module_tree)
299-
for section in course_xblock['sections']:
299+
for section in course_xblock.get('sections') or []:
300300
if xblock_id == section['block_id']:
301301
if section['units']:
302302
return section['block_id'], section['units'][0]['block_id']

0 commit comments

Comments
 (0)