Skip to content

Commit

Permalink
Make twf.Label validate to twc.EmptyField
Browse files Browse the repository at this point in the history
Just the same as twf.Space.
Otherwise, the validates results will include a None key which makes
e.g. TurboGears2 choke if the dict is passed as method kwargs.
  • Loading branch information
moschlar committed Nov 4, 2012
1 parent 0578d04 commit 83d8df3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tw2/forms/widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -638,6 +638,9 @@ class Label(twc.Widget):
label = None
id = None

def _validate(self, value, state=None):
return twc.EmptyField


class Form(twc.DisplayOnlyWidget):
"""
Expand Down

0 comments on commit 83d8df3

Please sign in to comment.