Set position just-in-time when rendering sequences for the first time

This commit is contained in:
Calen Pennington
2013-03-08 09:15:27 -05:00
parent 96541c434e
commit 972fed2e44

View File

@@ -75,6 +75,11 @@ class SequenceModule(XModule):
raise NotFoundError('Unexpected dispatch type')
def render(self):
# If we're rendering this sequence, but no position is set yet,
# default the position to the first element
if self.position is None:
self.position = 1
if self.rendered:
return
## Returns a set of all types of all sub-children