Code review comment for lp:~rvb/maas/bad-msg-bug-1301465

Revision history for this message
Raphaël Badin (rvb) wrote :

> 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?

Good point, done.

> 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.

Not really, this is meant to "highjack" the error message. I've improved the docstring to be really clear about this.

« Back to merge proposal