Skip to content

Commit

Permalink
Create state object also for RepeatingWidget
Browse files Browse the repository at this point in the history
  • Loading branch information
amol- committed Jul 25, 2014
1 parent b0b8c80 commit 16edf65
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tw2/core/widgets.py
Expand Up @@ -865,9 +865,12 @@ def _validate(self, value, state=None):
self.value = value
any_errors = False
data = []

state = util.clone_object(state, full_dict=value, validated_values=data)

for i, v in enumerate(value):
try:
data.append(self.children[i]._validate(v, data))
data.append(self.children[i]._validate(v, state))
except vd.catch:
data.append(vd.Invalid)
any_errors = True
Expand Down

0 comments on commit 16edf65

Please sign in to comment.