Merge pull request #21924 from edx/BOM-813

Updated the comparison operation to fix None comparison with an integer - BOM-813
This commit is contained in:
Aarif
2019-10-09 12:07:13 +05:00
committed by GitHub

View File

@@ -44,7 +44,7 @@ class RandomizeModule(RandomizeFields, XModule):
# NOTE: calling self.get_children() doesn't work until we've picked a choice
num_choices = len(self.descriptor.get_children())
if self.choice > num_choices:
if self.choice is not None and self.choice > num_choices:
# Oops. Children changed. Reset.
self.choice = None