Opened 18 years ago

Closed 18 years ago

Last modified 18 years ago

#2194 closed defect (fixed)

[patch] Minor inconsistency in "unique together" validation error message

Reported by: amcnabb@… Owned by: Adrian Holovaty
Component: contrib.admin Version:
Severity: trivial Keywords:
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Two of the fields in a model are 'prefname' and 'mrn'. The long name of 'prefname' is 'Preferred Name' and the long name of 'mrn' is 'Member Record Number'. I noticed a minor inconsistency when I added unique_together = (('prefname', 'mrn'),) to the Meta class of the model.

When I add two records that are not unique together, I get the error 'Person with this Preferred Name already exists for the given mrn.' This is great, except that the long name is given for one of the fields but not the other. It would be preferrable if the error read, 'Person with this Preferred Name already exists for the given Member Record Number'.

Like I said, it's very minor.

Attachments (1)

django-unique-together-error.diff (890 bytes ) - added by dackze+django@… 18 years ago.
Makes validator use only verbose names in this error message

Download all attachments as: .zip

Change History (4)

comment:1 by Adrian Holovaty, 18 years ago

Summary: very minor inconsistency in admin interfaceMinor inconsistency in "unique together" validation error message

by dackze+django@…, 18 years ago

Makes validator use only verbose names in this error message

comment:2 by dackze+django@…, 18 years ago

Summary: Minor inconsistency in "unique together" validation error message[patch] Minor inconsistency in "unique together" validation error message

comment:3 by Malcolm Tredinnick, 18 years ago

Resolution: fixed
Status: newclosed

Fixed in r3854.

Note: See TracTickets for help on using tickets.
Back to Top