Opened 10 years ago

Closed 10 years ago

Last modified 10 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: UI/UX:

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@… 10 years ago.
Makes validator use only verbose names in this error message

Download all attachments as: .zip

Change History (4)

comment:1 Changed 10 years ago by Adrian Holovaty

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

Changed 10 years ago by dackze+django@…

Makes validator use only verbose names in this error message

comment:2 Changed 10 years ago by dackze+django@…

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

comment:3 Changed 10 years ago by Malcolm Tredinnick

Resolution: fixed
Status: newclosed

Fixed in r3854.

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