Merge lp:~rvb/maas/bad-msg-bug-1301465 into lp:~maas-committers/maas/trunk
Proposed by
Raphaël Badin
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Raphaël Badin | ||||
Approved revision: | no longer in the source branch. | ||||
Merged at revision: | 2365 | ||||
Proposed branch: | lp:~rvb/maas/bad-msg-bug-1301465 | ||||
Merge into: | lp:~maas-committers/maas/trunk | ||||
Diff against target: |
44 lines (+15/-5) 1 file modified
src/maasserver/forms.py (+15/-5) |
||||
To merge this branch: | bzr merge lp:~rvb/maas/bad-msg-bug-1301465 | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Jeroen T. Vermeulen (community) | Approve | ||
Review via email: mp+220938@code.launchpad.net |
Commit message
Fix NodeForm's is_valid() method so that it uses Django's way of setting errors on forms instead of putting text in self.errors[
To post a comment you must log in.
Nice touch, thanks.
There's one change I'd like to ask for: error_key looks mysterious, as if you're giving up on encapsulation there and punting responsibility for explanation to Django. Would it be better called field_name?
I suppose there would be no point in checking for pre-existing errors on the same field, and appending instead of setting — although Django's API for this does look as if it was designed that way, sort of.